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:
mzocateli 2021-04-19 15:19:56 -03:00 committed by Alan Agius
parent f28412c3e0
commit 48701a9708

View File

@ -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 };