File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
packages/angular/cli/upgrade Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 7
7
*/
8
8
9
9
import { tags , terminal } from '@angular-devkit/core' ;
10
+ import { resolve } from '@angular-devkit/core/node' ;
10
11
import * as path from 'path' ;
11
12
import { SemVer , satisfies } from 'semver' ;
12
13
import { isWarningEnabled } from '../utilities/config' ;
@@ -53,9 +54,13 @@ export class Version {
53
54
} ;
54
55
55
56
try {
56
- const resolveOptions = { paths : [ path . join ( projectRoot , 'node_modules' ) , projectRoot ] } ;
57
- const angularPackagePath = require . resolve ( '@angular/core/package.json' , resolveOptions ) ;
58
- const rxjsPackagePath = require . resolve ( 'rxjs/package.json' , resolveOptions ) ;
57
+ const resolveOptions = {
58
+ basedir : projectRoot ,
59
+ checkGlobal : false ,
60
+ checkLocal : true ,
61
+ } ;
62
+ const angularPackagePath = resolve ( '@angular/core/package.json' , resolveOptions ) ;
63
+ const rxjsPackagePath = resolve ( 'rxjs/package.json' , resolveOptions ) ;
59
64
60
65
if ( ! isInside ( projectRoot , angularPackagePath )
61
66
|| ! isInside ( projectRoot , rxjsPackagePath ) ) {
You can’t perform that action at this time.
0 commit comments