From 9a68ce87eb825a4f924eb419b4b3f7d4a524de86 Mon Sep 17 00:00:00 2001 From: "trop[bot]" Date: Fri, 1 Feb 2019 08:33:11 -0800 Subject: [PATCH] feat: add ELECTRON_DISABLE_SANDBOX env var (#16662) --- atom/app/atom_main_delegate.cc | 3 +++ vsts-arm-test-steps.yml | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/atom/app/atom_main_delegate.cc b/atom/app/atom_main_delegate.cc index 3dd19e84daae8..6c40c99d91d6a 100644 --- a/atom/app/atom_main_delegate.cc +++ b/atom/app/atom_main_delegate.cc @@ -164,6 +164,9 @@ bool AtomMainDelegate::BasicStartupComplete(int* exit_code) { if (env->HasVar("ELECTRON_ENABLE_STACK_DUMPING")) base::debug::EnableInProcessStackDumping(); + if (env->HasVar("ELECTRON_DISABLE_SANDBOX")) + command_line->AppendSwitch(service_manager::switches::kNoSandbox); + chrome::RegisterPathProvider(); #if defined(OS_MACOSX) diff --git a/vsts-arm-test-steps.yml b/vsts-arm-test-steps.yml index e1c0be542398b..a033de953f4de 100644 --- a/vsts-arm-test-steps.yml +++ b/vsts-arm-test-steps.yml @@ -70,18 +70,24 @@ steps: python electron/script/verify-ffmpeg.py --source-root "$PWD" --build-dir out/Default --ffmpeg-path out/ffmpeg displayName: Verify non proprietary ffmpeg timeoutInMinutes: 5 + env: + ELECTRON_DISABLE_SANDBOX: 1 - bash: | cd src python electron/script/verify-mksnapshot.py --source-root "$PWD" --build-dir out/Default displayName: Verify mksnapshot timeoutInMinutes: 5 + env: + ELECTRON_DISABLE_SANDBOX: 1 - bash: | cd src ./out/Default/electron electron/spec --ci displayName: 'Run Electron tests' timeoutInMinutes: 10 + env: + ELECTRON_DISABLE_SANDBOX: 1 - task: PublishTestResults@2 displayName: 'Publish Test Results'