mirror of
https://github.com/balena-io/etcher.git
synced 2025-04-24 07:17:18 +00:00
fix(child-writer): Pass parent env during elevation (#1851)
Change-Type: patch
This commit is contained in:
parent
7ebff68506
commit
773ddb6e9e
@ -101,19 +101,21 @@ permissions.isElevated().then((elevated) => {
|
||||
// For debugging purposes
|
||||
console.log(`Running: ${commandArguments.join(' ')}`)
|
||||
|
||||
const commandEnv = _.assign({}, process.env, {
|
||||
ELECTRON_RUN_AS_NODE: 1,
|
||||
IPC_SERVER_ID: process.env.IPC_SERVER_ID,
|
||||
IPC_CLIENT_ID: process.env.IPC_CLIENT_ID,
|
||||
|
||||
// This environment variable prevents the AppImages
|
||||
// desktop integration script from presenting the
|
||||
// "installation" dialog.
|
||||
SKIP: 1
|
||||
|
||||
})
|
||||
|
||||
return permissions.elevateCommand(commandArguments, {
|
||||
applicationName: packageJSON.displayName,
|
||||
environment: {
|
||||
ELECTRON_RUN_AS_NODE: 1,
|
||||
IPC_SERVER_ID: process.env.IPC_SERVER_ID,
|
||||
IPC_CLIENT_ID: process.env.IPC_CLIENT_ID,
|
||||
|
||||
// This environment variable prevents the AppImages
|
||||
// desktop integration script from presenting the
|
||||
// "installation" dialog.
|
||||
SKIP: 1
|
||||
|
||||
}
|
||||
environment: commandEnv
|
||||
}).then((results) => {
|
||||
if (results.cancelled) {
|
||||
process.exit(EXIT_CODES.CANCELLED)
|
||||
|
Loading…
x
Reference in New Issue
Block a user