mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Use require to load package json
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