From 1fd4ed6c5d5f77d6c9ec998210b24e7c64d4d0a3 Mon Sep 17 00:00:00 2001 From: Alan Agius Date: Tue, 12 Feb 2019 15:56:07 +0100 Subject: [PATCH] fix(@angular-devkit/schematics): use `join` instead of normal string concatenation This leads to cleaner paths while debugging Fixes #13654 --- packages/angular_devkit/schematics/src/rules/move.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/angular_devkit/schematics/src/rules/move.ts b/packages/angular_devkit/schematics/src/rules/move.ts index b11e9de5f0..211d00f018 100644 --- a/packages/angular_devkit/schematics/src/rules/move.ts +++ b/packages/angular_devkit/schematics/src/rules/move.ts @@ -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))); }); }