Removes main error, fixes messaging for JSON parse
This commit is contained in:
parent
58d9d2cf41
commit
ee61a2880a
1 changed files with 1 additions and 5 deletions
|
@ -238,7 +238,7 @@ function loadApplicationPackage (packagePath) {
|
|||
try {
|
||||
packageJson = JSON.parse(fs.readFileSync(packageJsonPath))
|
||||
} catch (e) {
|
||||
showErrorMessage('Unable to parse package.json, it contains errors.\n\n' +
|
||||
showErrorMessage('Unable to parse package.json.\n\n' +
|
||||
`${e.toString()} in ${packageJsonPath}`)
|
||||
}
|
||||
if (packageJson.version) app.setVersion(packageJson.version)
|
||||
|
@ -248,10 +248,6 @@ function loadApplicationPackage (packagePath) {
|
|||
} else if (packageJson.name) {
|
||||
app.setName(packageJson.name)
|
||||
}
|
||||
if (!packageJson.main) {
|
||||
showErrorMessage('App is missing \'main\' property in package.json.\n\n' +
|
||||
`See: ${packageJsonPath}`)
|
||||
}
|
||||
app.setPath('userData', path.join(app.getPath('appData'), app.getName()))
|
||||
app.setPath('userCache', path.join(app.getPath('cache'), app.getName()))
|
||||
app.setAppPath(packagePath)
|
||||
|
|
Loading…
Reference in a new issue