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:
Jonas Hermsmeier 2017-10-31 20:20:27 +01:00 committed by GitHub
parent 68f3f695cd
commit 03b252024e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)
})
}
}