mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-23 03:06:38 +00:00
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
This commit is contained in:
parent
a155811678
commit
572f7d826a
@ -148,7 +148,7 @@ const elevateScriptWindows = async (path) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const elevateScriptUnix = async (path, name) => {
|
const elevateScriptUnix = async (path, name) => {
|
||||||
const cmd = [ 'sh', escapeSh(path) ].join(' ')
|
const cmd = [ 'bash', escapeSh(path) ].join(' ')
|
||||||
const [ , stderr ] = await sudoPrompt.execAsync(cmd, { name })
|
const [ , stderr ] = await sudoPrompt.execAsync(cmd, { name })
|
||||||
if (!_.isEmpty(stderr)) {
|
if (!_.isEmpty(stderr)) {
|
||||||
throw errors.createError({ title: stderr })
|
throw errors.createError({ title: stderr })
|
||||||
@ -157,7 +157,7 @@ const elevateScriptUnix = async (path, name) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const elevateScriptCatalina = async (path) => {
|
const elevateScriptCatalina = async (path) => {
|
||||||
const cmd = [ 'sh', escapeSh(path) ].join(' ')
|
const cmd = [ 'bash', escapeSh(path) ].join(' ')
|
||||||
try {
|
try {
|
||||||
const { cancelled } = await catalinaSudo(cmd)
|
const { cancelled } = await catalinaSudo(cmd)
|
||||||
return { cancelled }
|
return { cancelled }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user