Skip to content

Commit c724c1d

Browse files
committed
fix(@angular-devkit/architect): correctly parse inline boolean values in CLI options
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.
1 parent e20112b commit c724c1d

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

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

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

208+
for (const [key, value] of Object.entries(values)) {
209+
if (typeof value === 'string') {
210+
if (value === 'true') {
211+
values[key] = true;
212+
} else if (value === 'false') {
213+
values[key] = false;
214+
}
215+
}
216+
}
217+
208218
return {
209219
positionals,
210220
builderOptions,

0 commit comments

Comments
 (0)