mirror of
https://github.com/electron/electron.git
synced 2026-01-10 07:58:08 -05:00
finish standardizing!
This commit is contained in:
committed by
Kevin Sawicki
parent
4e2f1311e0
commit
42e7ee2b4a
@@ -243,7 +243,7 @@ function loadApplicationPackage (packagePath) {
|
||||
} else if (packageJson.name) {
|
||||
app.setName(packageJson.name)
|
||||
}
|
||||
|
||||
|
||||
app.setPath('userData', path.join(app.getPath('appData'), app.getName()))
|
||||
app.setPath('userCache', path.join(app.getPath('cache'), app.getName()))
|
||||
app.setAppPath(packagePath)
|
||||
@@ -251,7 +251,7 @@ function loadApplicationPackage (packagePath) {
|
||||
|
||||
// Run the app.
|
||||
require('module')._load(packagePath, module, true)
|
||||
} catch(e) {
|
||||
} catch (e) {
|
||||
if (e.code === 'MODULE_NOT_FOUND') {
|
||||
app.focus()
|
||||
dialog.showErrorBox(
|
||||
@@ -319,5 +319,6 @@ if (option.file && !option.webdriver) {
|
||||
} else if (option.interactive) {
|
||||
startRepl()
|
||||
} else {
|
||||
loadApplicationByUrl('file://' + __dirname + '/index.html')
|
||||
var indexPath = path.join(__dirname, '/index.html')
|
||||
loadApplicationByUrl(`file://${indexPath}`)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user