Skip to content

Commit

Permalink
fix(@angular-devkit/schematics-cli): accept windows like paths for sc…
Browse files Browse the repository at this point in the history
…hematics

correctly identify schematics paths like 'C:/dir/collection.json:schematic' that used to return 'C' as collection

(cherry picked from commit 48701a9)
  • Loading branch information
mzocateli authored and alan-agius4 committed Apr 22, 2021
1 parent 694f552 commit 94957d1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/angular_devkit/schematics_cli/bin/schematics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ function parseSchematicName(str: string | null): { collection: string, schematic

let schematic = str;
if (schematic && schematic.indexOf(':') != -1) {
[collection, schematic] = schematic.split(':', 2);
[collection, schematic] = [
schematic.slice(0, schematic.lastIndexOf(':')),
schematic.substring(schematic.lastIndexOf(':') + 1),
];
}

return { collection, schematic };
Expand Down

0 comments on commit 94957d1

Please sign in to comment.