From d24db32c4006b8f932040bb9d720994144137013 Mon Sep 17 00:00:00 2001 From: Charles Lyding <19598772+clydin@users.noreply.github.com> Date: Wed, 19 Sep 2018 21:23:37 -0400 Subject: [PATCH] fix(@angular/cli): relax compatible angular check package location --- packages/angular/cli/upgrade/version.ts | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/packages/angular/cli/upgrade/version.ts b/packages/angular/cli/upgrade/version.ts index 7cf97e6c8f5c..89e013a0f795 100644 --- a/packages/angular/cli/upgrade/version.ts +++ b/packages/angular/cli/upgrade/version.ts @@ -41,17 +41,6 @@ export class Version { let angularPkgJson; let rxjsPkgJson; - const isInside = (base: string, potential: string): boolean => { - const absoluteBase = path.resolve(base); - const absolutePotential = path.resolve(potential); - const relativePotential = path.relative(absoluteBase, absolutePotential); - if (!relativePotential.startsWith('..') && !path.isAbsolute(relativePotential)) { - return true; - } - - return false; - }; - try { const resolveOptions = { basedir: projectRoot, @@ -61,11 +50,6 @@ export class Version { const angularPackagePath = resolve('@angular/core/package.json', resolveOptions); const rxjsPackagePath = resolve('rxjs/package.json', resolveOptions); - if (!isInside(projectRoot, angularPackagePath) - || !isInside(projectRoot, rxjsPackagePath)) { - throw new Error(); - } - angularPkgJson = require(angularPackagePath); rxjsPkgJson = require(rxjsPackagePath); } catch {