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:
Alan Agius 2019-02-12 15:56:07 +01:00 committed by Alex Eagle
parent daab547731
commit 1fd4ed6c5d

View File

@ -5,7 +5,7 @@
* 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
*/
import { normalize } from '@angular-devkit/core';
import { join, normalize } from '@angular-devkit/core';
import { Rule } from '../engine/interface';
import { noop } from './base';
@ -30,7 +30,7 @@ export function move(from: string, to?: string): Rule {
} else {
// fromPath is a directory
tree.getDir(fromPath).visit(path => {
tree.rename(path, toPath + '/' + path.substr(fromPath.length));
tree.rename(path, join(toPath, path.substr(fromPath.length)));
});
}