You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(cli): --yes option to accept all questions (#826)
Adds a new `--yes` cli option so that when provided, commands can
continue without confirmation. Any confirmation prompts will be
accepted. Other user input will use a default value if available. The
CLI might still prompt for input in situations where there is no default
answer.
Fixes#732
---
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache-2.0 license
---------
Co-authored-by: Momo Kornher <kornherm@amazon.co.uk>
Copy file name to clipboardExpand all lines: packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/synth/cdk-synth-telemetry-with-errors.integtest.ts
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,7 @@ integTest(
36
36
ci: expect.anything(),// changes based on where this is called
37
37
validation: true,
38
38
quiet: false,
39
+
yes: false,
39
40
},
40
41
config: {
41
42
context: {},
@@ -84,6 +85,7 @@ integTest(
84
85
ci: expect.anything(),// changes based on where this is called
Copy file name to clipboardExpand all lines: packages/aws-cdk/lib/cli/cli-config.ts
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,7 @@ export async function makeConfig(): Promise<CliConfig> {
44
44
'ci': {type: 'boolean',desc: 'Force CI detection. If CI=true then logs will be sent to stdout instead of stderr',default: YARGS_HELPERS.isCI()},
45
45
'unstable': {type: 'array',desc: 'Opt in to unstable features. The flag indicates that the scope and API of a feature might still change. Otherwise the feature is generally production ready and fully supported. Can be specified multiple times.',default: []},
46
46
'telemetry-file': {type: 'string',desc: 'Send telemetry data to a local file.',default: undefined},
47
+
'yes': {type: 'boolean',alias: 'y',desc: 'Automatically answer interactive prompts with the recommended response. This includes confirming actions.',default: false},
0 commit comments