We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent da7063f commit 20af866Copy full SHA for 20af866
packages/schematics/angular/utility/generate-from-files.ts
@@ -60,14 +60,17 @@ export function generateFromFiles(
60
...extraTemplateValues,
61
}),
62
!options.type
63
- ? forEach(((file) => {
64
- return file.path.includes('..')
65
- ? {
66
- content: file.content,
67
- path: file.path.replace('..', '.'),
68
- }
69
- : file;
70
- }) as FileOperator)
+ ? forEach((file) => {
+ let filePath: string = file.path;
+ while (filePath.includes('..')) {
+ filePath = filePath.replaceAll('..', '.');
+ }
+
+ return {
+ content: file.content,
71
+ path: filePath,
72
+ } as ReturnType<FileOperator>;
73
+ })
74
: noop(),
75
move(parsedPath.path + (options.flat ? '' : '/' + strings.dasherize(options.name))),
76
]);
0 commit comments