Use require to load package.json instead of fs/JSON
This commit is contained in:
parent
83ae14f2ed
commit
b8e5180132
1 changed files with 1 additions and 1 deletions
|
@ -119,7 +119,7 @@ for (i = 0, len = searchPaths.length; i < len; i++) {
|
|||
packagePath = searchPaths[i]
|
||||
try {
|
||||
packagePath = path.join(process.resourcesPath, packagePath)
|
||||
packageJson = JSON.parse(fs.readFileSync(path.join(packagePath, 'package.json')))
|
||||
packageJson = require(path.join(packagePath, 'package.json'))
|
||||
break
|
||||
} catch (error) {
|
||||
continue
|
||||
|
|
Loading…
Reference in a new issue