Skip to content

Commit

Permalink
fix(@angular-devkit/schematics): use join instead of normal string …
Browse files Browse the repository at this point in the history
…concatenation

This leads to cleaner paths while debugging

Fixes #13654
  • Loading branch information
Alan Agius authored and alexeagle committed Feb 13, 2019
1 parent e6c6cfc commit 32e3b7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/angular_devkit/schematics/src/rules/move.ts
Expand Up @@ -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';

Expand All @@ -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)));
});
}

Expand Down

0 comments on commit 32e3b7c

Please sign in to comment.