mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-11 21:27:31 +00:00
release/dist/cli: add --verbose to print subcommand output
By default, cmd/dist only prints the output of failed commands. With this, you can turn all the noisy output back on. Updates tailscale/corp#9045 Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:

committed by
Dave Anderson

parent
0df11253ec
commit
311352d195
3
release/dist/cli/cli.go
vendored
3
release/dist/cli/cli.go
vendored
@@ -60,6 +60,7 @@ func CLI(getTargets func() ([]dist.Target, error)) *ffcli.Command {
|
||||
FlagSet: (func() *flag.FlagSet {
|
||||
fs := flag.NewFlagSet("build", flag.ExitOnError)
|
||||
fs.StringVar(&buildArgs.manifest, "manifest", "", "manifest file to write")
|
||||
fs.BoolVar(&buildArgs.verbose, "verbose", false, "verbose logging")
|
||||
return fs
|
||||
})(),
|
||||
LongHelp: strings.TrimSpace(`
|
||||
@@ -88,6 +89,7 @@ func runList(ctx context.Context, filters []string, targets []dist.Target) error
|
||||
|
||||
var buildArgs struct {
|
||||
manifest string
|
||||
verbose bool
|
||||
}
|
||||
|
||||
func runBuild(ctx context.Context, filters []string, targets []dist.Target) error {
|
||||
@@ -109,6 +111,7 @@ func runBuild(ctx context.Context, filters []string, targets []dist.Target) erro
|
||||
return fmt.Errorf("creating build context: %w", err)
|
||||
}
|
||||
defer b.Close()
|
||||
b.Verbose = buildArgs.verbose
|
||||
|
||||
out, err := b.Build(tgts)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user