From 572f7d826a4efb96e893e955d42b32c0d5582024 Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Fri, 22 Nov 2019 15:43:08 +0100 Subject: [PATCH] Use bash instead of sh for running the elevated process on Linux and Mac Change-type: patch Changelog-entry: Use bash instead of sh for running the elevated process on Linux and Mac --- lib/shared/permissions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/shared/permissions.js b/lib/shared/permissions.js index 6c23a23d..b403007d 100755 --- a/lib/shared/permissions.js +++ b/lib/shared/permissions.js @@ -148,7 +148,7 @@ const elevateScriptWindows = async (path) => { } const elevateScriptUnix = async (path, name) => { - const cmd = [ 'sh', escapeSh(path) ].join(' ') + const cmd = [ 'bash', escapeSh(path) ].join(' ') const [ , stderr ] = await sudoPrompt.execAsync(cmd, { name }) if (!_.isEmpty(stderr)) { throw errors.createError({ title: stderr }) @@ -157,7 +157,7 @@ const elevateScriptUnix = async (path, name) => { } const elevateScriptCatalina = async (path) => { - const cmd = [ 'sh', escapeSh(path) ].join(' ') + const cmd = [ 'bash', escapeSh(path) ].join(' ') try { const { cancelled } = await catalinaSudo(cmd) return { cancelled }