Skip to content

Commit 73f6bbb

Browse files
committed
fix(@angular-devkit/architect): correctly parse inline boolean values in CLI options (#34201)
When CLI options defined as boolean are provided with inline values like '--verbose=false', 'node:util.parseArgs' in non-strict mode returns string values ('false' / 'true') rather than booleans. Normalize string boolean values in CLI options. PR Close #34201
1 parent 7085a6e commit 73f6bbb

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎packages/angular_devkit/architect/bin/architect.ts‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,15 @@ function parseOptions(args: string[]): Options {
205205
}
206206
}
207207

208+
for (const key of Object.keys(CLI_OPTION_DEFINITIONS)) {
209+
const value = values[key];
210+
if (value === 'true') {
211+
values[key] = true;
212+
} else if (value === 'false') {
213+
values[key] = false;
214+
}
215+
}
216+
208217
return {
209218
positionals,
210219
builderOptions,

0 commit comments

Comments
 (0)