mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-19 09:16:38 +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) => {
|
||||
if (_.includes([ 'win32', 'darwin' ], os.platform()) || isElevated) {
|
||||
if (isElevated) {
|
||||
require('./gui/etcher')
|
||||
return Bluebird.resolve()
|
||||
}
|
||||
@ -113,3 +116,4 @@ if (process.env.ELECTRON_RUN_AS_NODE || process.env.ATOM_SHELL_INTERNAL_RUN_AS_N
|
||||
electron.app.exit(EXIT_CODES.GENERAL_ERROR)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user