Skip to content

Commit 1fd4ed6

Browse files
Alan Agiusalexeagle
Alan Agius
authored andcommitted
fix(@angular-devkit/schematics): use join instead of normal string concatenation
This leads to cleaner paths while debugging Fixes #13654
1 parent daab547 commit 1fd4ed6

File tree

1 file changed

+2
-2
lines changed
  • packages/angular_devkit/schematics/src/rules

1 file changed

+2
-2
lines changed

packages/angular_devkit/schematics/src/rules/move.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Use of this source code is governed by an MIT-style license that can be
66
* found in the LICENSE file at https://angular.io/license
77
*/
8-
import { normalize } from '@angular-devkit/core';
8+
import { join, normalize } from '@angular-devkit/core';
99
import { Rule } from '../engine/interface';
1010
import { noop } from './base';
1111

@@ -30,7 +30,7 @@ export function move(from: string, to?: string): Rule {
3030
} else {
3131
// fromPath is a directory
3232
tree.getDir(fromPath).visit(path => {
33-
tree.rename(path, toPath + '/' + path.substr(fromPath.length));
33+
tree.rename(path, join(toPath, path.substr(fromPath.length)));
3434
});
3535
}
3636

0 commit comments

Comments
 (0)