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
Copy file name to clipboardExpand all lines: packages/aws-cdk/lib/cli/cli-config.ts
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -395,7 +395,7 @@ export async function makeConfig(): Promise<CliConfig> {
395
395
'list': {type: 'boolean',desc: 'List the available templates'},
396
396
'generate-only': {type: 'boolean',default: false,desc: 'If true, only generates project files, without executing additional operations such as setting up a git repo, installing dependencies or compiling the project'},
397
397
'lib-version': {type: 'string',alias: 'V',default: undefined,desc: 'The version of the CDK library (aws-cdk-lib) to initialize the project with. Defaults to the version that was current when this CLI was built.'},
398
-
'from-path': {type: 'string',desc: 'Path to a local custom template directory',requiresArg: true},
398
+
'from-path': {type: 'string',desc: 'Path to a local custom template directory',requiresArg: true,conflicts: ['lib-version']},
@@ -75,19 +77,6 @@ export async function cliInit(options: CliInitOptions) {
75
77
constgenerateOnly=options.generateOnly??false;
76
78
constworkDir=options.workDir??process.cwd();
77
79
78
-
// Validate conflicting options
79
-
if(options.fromPath&&options.type){
80
-
thrownewToolkitError('Cannot specify both --from-path and template name. Use either --from-path for custom templates or specify a built-in template name.');
81
-
}
82
-
83
-
if(options.fromPath&&options.libVersion){
84
-
thrownewToolkitError('Cannot specify --lib-version with --from-path. Custom templates do not process version placeholders.');
85
-
}
86
-
87
-
if(options.fromPath&&options.stackName){
88
-
thrownewToolkitError('Cannot specify --stack-name with --from-path. Custom templates do not process stack name placeholders.');
89
-
}
90
-
91
80
// Step 1: Load template
92
81
lettemplate: InitTemplate;
93
82
if(options.fromPath){
@@ -136,17 +125,12 @@ async function loadLocalTemplate(templatePath: string): Promise<InitTemplate> {
136
125
* Load a built-in template by name
137
126
* @param ioHelper - IO helper for user interaction
0 commit comments