mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-17 11:03:53 +08:00
fix(@angular-devkit/schematics): use join
instead of normal string concatenation
This leads to cleaner paths while debugging Fixes #13654
This commit is contained in:
parent
daab547731
commit
1fd4ed6c5d
@ -5,7 +5,7 @@
|
|||||||
* Use of this source code is governed by an MIT-style license that can be
|
* Use of this source code is governed by an MIT-style license that can be
|
||||||
* found in the LICENSE file at https://angular.io/license
|
* found in the LICENSE file at https://angular.io/license
|
||||||
*/
|
*/
|
||||||
import { normalize } from '@angular-devkit/core';
|
import { join, normalize } from '@angular-devkit/core';
|
||||||
import { Rule } from '../engine/interface';
|
import { Rule } from '../engine/interface';
|
||||||
import { noop } from './base';
|
import { noop } from './base';
|
||||||
|
|
||||||
@ -30,7 +30,7 @@ export function move(from: string, to?: string): Rule {
|
|||||||
} else {
|
} else {
|
||||||
// fromPath is a directory
|
// fromPath is a directory
|
||||||
tree.getDir(fromPath).visit(path => {
|
tree.getDir(fromPath).visit(path => {
|
||||||
tree.rename(path, toPath + '/' + path.substr(fromPath.length));
|
tree.rename(path, join(toPath, path.substr(fromPath.length)));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user