Skip to content

Commit

Permalink
refactor(packager): compute outDir from providedOptions w/default
Browse files Browse the repository at this point in the history
  • Loading branch information
anulman authored and MarshallOfSound committed Mar 25, 2017
1 parent 42fad7f commit 1e26d25
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/api/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const d = debug('electron-forge:packager');
* @property {boolean} [interactive=false] Whether to use sensible defaults or prompt the user visually
* @property {string} [arch=process.arch] The target arch
* @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 output directory for packaged apps
*/

/**
Expand All @@ -40,6 +41,7 @@ export default async (providedOptions = {}) => {
platform: process.platform,
}, providedOptions);

const outDir = providedOptions.outDir || `${dir}/out`;
let prepareSpinner = ora(`Preparing to Package Application for arch: ${(arch === 'all' ? 'ia32' : arch).cyan}`).start();
let prepareCounter = 0;

Expand Down Expand Up @@ -97,7 +99,7 @@ export default async (providedOptions = {}) => {
dir,
arch,
platform,
out: path.resolve(dir, 'out'),
out: outDir,
electronVersion: packageJSON.devDependencies['electron-prebuilt-compile'],
});
packageOpts.quiet = true;
Expand Down

0 comments on commit 1e26d25

Please sign in to comment.