Skip to content

Commit e931a58

Browse files
authored
fix(@schematics/angular): remove 'none' from aiConfig when other tools are selected
Fixes an issue where selecting both None and another AI tool during ng new caused schematic validation to fail. The fix ensures that None is treated as mutually exclusive and is automatically removed when other tools are selected.
1 parent cc05242 commit e931a58

File tree

1 file changed

+4
-0
lines changed
  • packages/schematics/angular/ng-new

1 file changed

+4
-0
lines changed

packages/schematics/angular/ng-new/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ export default function (options: NgNewOptions): Rule {
6060
zoneless: options.zoneless,
6161
};
6262

63+
if (options.aiConfig?.includes('none') && options.aiConfig.length > 1) {
64+
options.aiConfig = options.aiConfig.filter(t => t !== 'none');
65+
}
66+
6367
return chain([
6468
mergeWith(
6569
apply(empty(), [

0 commit comments

Comments
 (0)