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:
commit
a053dc2f7d
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue