Skip to content
Permalink
Browse files

refactor(maker): compute outDir from providedOptions w/default

  • Loading branch information
anulman authored and MarshallOfSound committed Feb 7, 2017
1 parent 1e26d25 commit d69e7626b29ca407970f61bd07039e8157d22b36
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/api/make.js
@@ -20,6 +20,7 @@ import packager from './package';
* @property {Array<string>} [overrideTargets] An array of make targets to override your forge config
* @property {string} [arch=host architecture] The target architecture
* @property {string} [platform=process.platform] The target platform. NOTE: This is limited to be the current platform at the moment
* @property {string} [outDir=`${dir}/out`] The path to the directory containing generated distributables
*/

/**
@@ -37,6 +38,8 @@ export default async (providedOptions = {}) => {
arch: electronHostArch(),
platform: process.platform,
}, providedOptions);

const outDir = providedOptions.outDir || `${dir}/out`;
asyncOra.interactive = interactive;

let forgeConfig;
@@ -96,7 +99,7 @@ export default async (providedOptions = {}) => {
const outputs = [];

for (const targetArch of targetArchs) {
const packageDir = path.resolve(dir, `out/${appName}-${declaredPlatform}-${targetArch}`);
const packageDir = path.resolve(outDir, `${appName}-${declaredPlatform}-${targetArch}`);
if (!(await fs.exists(packageDir))) {
throw new Error(`Couldn't find packaged app at: ${packageDir}`);
}

0 comments on commit d69e762

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