Somehow electron packager returns appPath as an array instead of a string, this fixes it

This commit is contained in:
Jia Hao 2016-01-25 01:10:03 +08:00
parent b7e2fbf86e
commit 0a90cb2ee7
1 changed files with 6 additions and 1 deletions

View File

@ -60,7 +60,12 @@ function buildApp(options, callback) {
packager(options, callback);
},
(appPath, callback) => {
(appPathArray, callback) => {
// somehow appPathArray is a 1 element array
if (appPathArray.length !== 1) {
console.warn('Warning: Packaged app path contains more than one element', appPathArray);
}
const appPath = appPathArray[0];
callback(null, appPath);
}
], callback);