mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-19 20:52:06 +08:00
fix(@angular-devkit/schematics-cli): accept windows like paths for schematics
correctly identify schematics paths like 'C:/dir/collection.json:schematic' that used to return 'C' as collection
This commit is contained in:
parent
f28412c3e0
commit
48701a9708
@ -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 };
|
||||
|
Loading…
x
Reference in New Issue
Block a user