@@ -68,10 +68,7 @@ export class ProjectInitializer extends Disposable {
68
68
69
69
private async createFromCommandLine ( template : FileListItem , projectFolder : Uri , p : ProgressHandler ) {
70
70
let args = [ GaugeCommands . Init , template . label ] ;
71
- let options : CommonSpawnOptions = { cwd : projectFolder . fsPath , env : process . env } ;
72
- if ( platform ( ) === "win32" ) {
73
- options . shell = true ;
74
- }
71
+ let options : CommonSpawnOptions = { cwd : projectFolder . fsPath , env : process . env , ...CLI . getDefaultSpawnOptions ( ) } ;
75
72
p . report ( "Initializing project..." ) ;
76
73
let proc = spawn ( this . cli . gaugeCommand ( ) , args , options ) ;
77
74
proc . addListener ( 'error' , async ( err ) => {
@@ -86,10 +83,7 @@ export class ProjectInitializer extends Disposable {
86
83
87
84
private async getTemplatesList ( ) : Promise < Array < FileListItem > > {
88
85
let args = [ "template" , "--list" , "--machine-readable" ] ;
89
- let options : CommonSpawnOptions = { env : process . env } ;
90
- if ( platform ( ) === "win32" ) {
91
- options . shell = true ;
92
- }
86
+ let options : CommonSpawnOptions = { env : process . env , ...CLI . getDefaultSpawnOptions ( ) } ;
93
87
let cp = spawnSync ( this . cli . gaugeCommand ( ) , args , options ) ;
94
88
try {
95
89
let _templates = JSON . parse ( cp . stdout . toString ( ) ) ;
0 commit comments