File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed
packages/plugin-tools/src/migrations/update-4-1-0 Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -54,17 +54,19 @@ export default async function (tree: Tree) {
54
54
const collectionPath = readPackageMigrationConfig ( packageName ) . migrations ;
55
55
let implPath : string ;
56
56
57
- try {
58
- implPath = require . resolve ( implRelativePath , {
59
- paths : [ dirname ( collectionPath ) ] ,
60
- } ) ;
61
- } catch ( e ) {
62
- // workaround for a bug in node 12
63
- implPath = require . resolve ( `${ dirname ( collectionPath ) } /${ implRelativePath } ` ) ;
57
+ if ( collectionPath ) {
58
+ try {
59
+ implPath = require . resolve ( implRelativePath , {
60
+ paths : [ dirname ( collectionPath ) ] ,
61
+ } ) ;
62
+ } catch ( e ) {
63
+ // workaround for a bug in node 12
64
+ implPath = require . resolve ( `${ dirname ( collectionPath ) } /${ implRelativePath } ` ) ;
65
+ }
66
+
67
+ const fn = require ( implPath ) . default ;
68
+ await fn ( tree , { } ) ;
64
69
}
65
-
66
- const fn = require ( implPath ) . default ;
67
- await fn ( tree , { } ) ;
68
70
}
69
71
// TODO: Edit the generators to use the new tsconfig
70
72
You can’t perform that action at this time.
0 commit comments