这是indexloc提供的服务,不要输入任何密码
Skip to content

Allow --dry in addition to --dry-run #867

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions cli/internal/run/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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"):
Expand Down