File tree 2 files changed +11
-1
lines changed
2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ export default class NewCommand extends SchematicCommand {
9
9
'Creates a new directory and a new Angular app.' ;
10
10
public static aliases = [ 'n' ] ;
11
11
public scope = CommandScope . outsideProject ;
12
+ public readonly allowMissingWorkspace = true ;
12
13
public arguments : string [ ] = [ ] ;
13
14
public options : Option [ ] = [
14
15
...this . coreOptions ,
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { NodeJsSyncHost } from '@angular-devkit/core/node';
4
4
import { ArgumentStrategy , Command , Option } from './command' ;
5
5
import { NodeWorkflow } from '@angular-devkit/schematics/tools' ;
6
6
import { DryRunEvent , UnsuccessfulWorkflowExecution } from '@angular-devkit/schematics' ;
7
+ import { getPackageManager } from '../utilities/config' ;
7
8
import { getCollection , getSchematic } from '../utilities/schematics' ;
8
9
import { take } from 'rxjs/operators' ;
9
10
import { WorkspaceLoader } from '../models/workspace-loader' ;
@@ -83,7 +84,15 @@ export abstract class SchematicCommand extends Command {
83
84
let nothingDone = true ;
84
85
const loggingQueue : string [ ] = [ ] ;
85
86
const fsHost = new virtualFs . ScopedHost ( new NodeJsSyncHost ( ) , normalize ( this . project . root ) ) ;
86
- const workflow = new NodeWorkflow ( fsHost , { force, dryRun } ) ;
87
+ const workflow = new NodeWorkflow (
88
+ fsHost ,
89
+ {
90
+ force,
91
+ dryRun,
92
+ packageManager : getPackageManager ( ) ,
93
+ root : normalize ( this . project . root ) ,
94
+ } ,
95
+ ) ;
87
96
88
97
const cwd = process . env . PWD ;
89
98
const workingDir = cwd . replace ( this . project . root , '' ) . replace ( / \\ / g, '/' ) ;
You can’t perform that action at this time.
0 commit comments