Skip to content

Commit 1e26d25

Browse files
anulmanMarshallOfSound
authored andcommitted
refactor(packager): compute outDir from providedOptions w/default
1 parent 42fad7f commit 1e26d25

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/api/package.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const d = debug('electron-forge:packager');
2323
* @property {boolean} [interactive=false] Whether to use sensible defaults or prompt the user visually
2424
* @property {string} [arch=process.arch] The target arch
2525
* @property {string} [platform=process.platform] The target platform. NOTE: This is limited to be the current platform at the moment
26+
* @property {string} [outDir=`${dir}/out`] The path to the output directory for packaged apps
2627
*/
2728

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

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

@@ -97,7 +99,7 @@ export default async (providedOptions = {}) => {
9799
dir,
98100
arch,
99101
platform,
100-
out: path.resolve(dir, 'out'),
102+
out: outDir,
101103
electronVersion: packageJSON.devDependencies['electron-prebuilt-compile'],
102104
});
103105
packageOpts.quiet = true;

0 commit comments

Comments
 (0)