From 05e7dcfb818d146abc217710f19c1c9dda005ba8 Mon Sep 17 00:00:00 2001 From: Greg Soltis Date: Fri, 11 Mar 2022 11:49:15 -0800 Subject: [PATCH] Allow --dry in addition to --dry-run --- cli/internal/run/run.go | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/cli/internal/run/run.go b/cli/internal/run/run.go index c8c40cbd7e2cb..be00019ab5cea 100644 --- a/cli/internal/run/run.go +++ b/cli/internal/run/run.go @@ -133,9 +133,9 @@ Options: (default false) --no-cache Avoid saving task results to the cache. Useful for development/watch tasks. (default false) - --dry-run[=json] List the packages in scope and the tasks that would be run, - but don't actually run them. - Passing --dry-run=json will render the output in JSON format. + --dry/--dry-run[=json] List the packages in scope and the tasks that would be run, + but don't actually run them. Passing --dry=json or + --dry-run=json will render the output in JSON format. `) return strings.TrimSpace(helpText) } @@ -561,6 +561,11 @@ func parseRunArgs(args []string, output cli.Ui) (*RunOptions, error) { if strings.HasPrefix(arg, "--dry-run=json") { runOptions.dryRunJson = true } + case strings.HasPrefix(arg, "--dry"): + runOptions.dryRun = true + if strings.HasPrefix(arg, "--dry=json") { + runOptions.dryRunJson = true + } case strings.HasPrefix(arg, "--team"): case strings.HasPrefix(arg, "--token"): case strings.HasPrefix(arg, "--api"):