mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-20 09:46:31 +00:00
fix(gui): Don't check elevation on start on Windows (#1822)
This fixes Electron startup on Windows Change-Type: patch
This commit is contained in:
parent
68f3f695cd
commit
03b252024e
@ -60,8 +60,11 @@ if (process.env.ELECTRON_RUN_AS_NODE || process.env.ATOM_SHELL_INTERNAL_RUN_AS_N
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if (_.includes([ 'win32', 'darwin' ], os.platform())) {
|
||||||
|
require('./gui/etcher')
|
||||||
|
} else {
|
||||||
permissions.isElevated().then((isElevated) => {
|
permissions.isElevated().then((isElevated) => {
|
||||||
if (_.includes([ 'win32', 'darwin' ], os.platform()) || isElevated) {
|
if (isElevated) {
|
||||||
require('./gui/etcher')
|
require('./gui/etcher')
|
||||||
return Bluebird.resolve()
|
return Bluebird.resolve()
|
||||||
}
|
}
|
||||||
@ -112,4 +115,5 @@ if (process.env.ELECTRON_RUN_AS_NODE || process.env.ATOM_SHELL_INTERNAL_RUN_AS_N
|
|||||||
electron.dialog.showErrorBox(errors.getTitle(error), errors.getDescription(error))
|
electron.dialog.showErrorBox(errors.getTitle(error), errors.getDescription(error))
|
||||||
electron.app.exit(EXIT_CODES.GENERAL_ERROR)
|
electron.app.exit(EXIT_CODES.GENERAL_ERROR)
|
||||||
})
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user