File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 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 {
99 'Creates a new directory and a new Angular app.' ;
1010 public static aliases = [ 'n' ] ;
1111 public scope = CommandScope . outsideProject ;
12+ public readonly allowMissingWorkspace = true ;
1213 public arguments : string [ ] = [ ] ;
1314 public options : Option [ ] = [
1415 ...this . coreOptions ,
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { NodeJsSyncHost } from '@angular-devkit/core/node';
44import { ArgumentStrategy , Command , Option } from './command' ;
55import { NodeWorkflow } from '@angular-devkit/schematics/tools' ;
66import { DryRunEvent , UnsuccessfulWorkflowExecution } from '@angular-devkit/schematics' ;
7+ import { getPackageManager } from '../utilities/config' ;
78import { getCollection , getSchematic } from '../utilities/schematics' ;
89import { take } from 'rxjs/operators' ;
910import { WorkspaceLoader } from '../models/workspace-loader' ;
@@ -83,7 +84,15 @@ export abstract class SchematicCommand extends Command {
8384 let nothingDone = true ;
8485 const loggingQueue : string [ ] = [ ] ;
8586 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+ ) ;
8796
8897 const cwd = process . env . PWD ;
8998 const workingDir = cwd . replace ( this . project . root , '' ) . replace ( / \\ / g, '/' ) ;
You can’t perform that action at this time.
0 commit comments