Skip to content
Permalink
Browse files

refactor(maker): DRY up app name

  • Loading branch information
malept committed Dec 4, 2016
1 parent e8e1054 commit f5ae494fd44a8b4822ea27eeb7b345770b131a18
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/electron-forge-make.js
@@ -49,7 +49,8 @@ const main = async () => {
console.info('Making for the following targets:', `${targets.join(', ')}`.cyan);

const packageJSON = JSON.parse(await fs.readFile(path.resolve(dir, 'package.json'), 'utf8'));
const packageDir = path.resolve(dir, `out/${packageJSON.productName || packageJSON.name}-${process.platform}-${process.arch}`);
const appName = packageJSON.productName || packageJSON.name;
const packageDir = path.resolve(dir, `out/${appName}-${process.platform}-${process.arch}`);
if (!(await fs.exists(packageDir))) {
throw new Error(`Couldn't find packaged app at: ${packageDir}`);
}
@@ -68,7 +69,7 @@ const main = async () => {
}
}
try {
await (maker.default || maker)(packageDir, packageJSON.productName || packageJSON.name, forgeConfig, packageJSON);
await (maker.default || maker)(packageDir, appName, forgeConfig, packageJSON);
} catch (err) {
makeSpinner.fail();
if (err) throw err;

0 comments on commit f5ae494

Please sign in to comment.
You can’t perform that action at this time.