mirror of
https://github.com/electron/electron.git
synced 2026-01-09 23:48:01 -05:00
Merge pull request #6376 from electron/require-package-json-in-default-app
Use require to load package.json in default app
This commit is contained in:
@@ -229,7 +229,7 @@ function loadApplicationPackage (packagePath) {
|
||||
if (fs.existsSync(packageJsonPath)) {
|
||||
let packageJson
|
||||
try {
|
||||
packageJson = JSON.parse(fs.readFileSync(packageJsonPath))
|
||||
packageJson = require(packageJsonPath)
|
||||
} catch (e) {
|
||||
showErrorMessage(`Unable to parse ${packageJsonPath}\n\n${e.message}`)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user