File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,11 @@ const { getUNCHost, addUNCHostToAllowlist } = require('./vs/base/node/unc');
27
27
const product = require ( '../product.json' ) ;
28
28
const { app, protocol, crashReporter, Menu } = require ( 'electron' ) ;
29
29
30
- // Enable sandbox globally
31
- app . enableSandbox ( ) ;
30
+ // Enable sandbox globally unless disabled via `--no-sandbox` argument
31
+ const args = parseCLIArgs ( ) ;
32
+ if ( args [ 'sandbox' ] ) {
33
+ app . enableSandbox ( ) ;
34
+ }
32
35
33
36
// Enable portable support
34
37
const portable = bootstrapNode . configurePortable ( product ) ;
@@ -37,7 +40,6 @@ const portable = bootstrapNode.configurePortable(product);
37
40
bootstrap . enableASARSupport ( ) ;
38
41
39
42
// Set userData path before app 'ready' event
40
- const args = parseCLIArgs ( ) ;
41
43
const userDataPath = getUserDataPath ( args , product . nameShort ?? 'code-oss-dev' ) ;
42
44
if ( process . platform === 'win32' ) {
43
45
const userDataUNCHost = getUNCHost ( userDataPath ) ;
@@ -464,7 +466,13 @@ function parseCLIArgs() {
464
466
'locale' ,
465
467
'js-flags' ,
466
468
'crash-reporter-directory'
467
- ]
469
+ ] ,
470
+ default : {
471
+ 'sandbox' : true
472
+ } ,
473
+ alias : {
474
+ 'no-sandbox' : 'sandbox'
475
+ }
468
476
} ) ;
469
477
}
470
478
You can’t perform that action at this time.
0 commit comments