@@ -77,7 +77,7 @@ export default class extends Generator {
77
77
this . option ( 'quick' , { type : Boolean , alias : 'q' , description : 'Quick mode, skip all optional prompts and use defaults' } ) ;
78
78
this . option ( 'open' , { type : Boolean , alias : 'o' , description : 'Open the generated extension in Visual Studio Code' } ) ;
79
79
this . option ( 'openInInsiders' , { type : Boolean , alias : 'O' , description : 'Open the generated extension in Visual Studio Code Insiders' } ) ;
80
-
80
+ this . option ( 'skipOpen' , { type : Boolean , alias : 's' , description : 'Skip opening the generated extension in Visual Studio Code' } ) ;
81
81
this . option ( 'extensionType' , { type : String , alias : 't' , description : extensionGenerators . slice ( 0 , 6 ) . map ( e => e . aliases [ 0 ] ) . join ( ', ' ) + '...' } ) ;
82
82
this . option ( 'extensionDisplayName' , { type : String , alias : 'n' , description : 'Display name of the extension' } ) ;
83
83
this . option ( 'extensionId' , { type : String , description : 'Id of the extension' } ) ;
@@ -242,7 +242,7 @@ export default class extends Generator {
242
242
243
243
const [ codeStableLocation , codeInsidersLocation ] = await Promise . all ( [ which ( 'code' ) . catch ( ( ) => undefined ) , which ( 'code-insiders' ) . catch ( ( ) => undefined ) ] ) ;
244
244
245
- if ( ! this . extensionConfig . insiders && ! this . options [ 'open' ] && ! this . options [ 'openInInsiders' ] && ! this . options [ 'quick' ] ) {
245
+ if ( ! this . extensionConfig . insiders && ! this . options [ 'open' ] && ! this . options [ 'openInInsiders' ] && ! this . options [ 'quick' ] && ! this . options [ 'skipOpen' ] ) {
246
246
const cdLocation = this . options [ 'destination' ] || this . extensionConfig . name ;
247
247
248
248
this . log ( 'To start editing with Visual Studio Code, use the following commands:' ) ;
@@ -265,6 +265,10 @@ export default class extends Generator {
265
265
this . log ( 'For more information, also visit http://code.visualstudio.com and follow us @code.' ) ;
266
266
this . log ( '\r\n' ) ;
267
267
268
+ if ( this . options [ 'skipOpen' ] ) {
269
+ return ;
270
+ }
271
+
268
272
if ( this . options [ "open" ] ) {
269
273
if ( codeStableLocation ) {
270
274
this . log ( `Opening ${ this . destinationPath ( ) } in Visual Studio Code...` ) ;
0 commit comments