Skip to content

Commit

Permalink
fix(maker): allow comma seperated arches in make as well as package
Browse files Browse the repository at this point in the history
ISSUES CLOSED: #227
  • Loading branch information
MarshallOfSound authored and malept committed Aug 13, 2017
1 parent 9d17ca9 commit 9c69b08
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/api/make.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export default async (providedOptions = {}) => {

info(interactive, 'Making for the following targets:', `${targets.join(', ')}`.cyan);

let targetArchs = [declaredArch];
let targetArchs = declaredArch.split(',');
if (declaredArch === 'all') {
switch (platform) {
case 'darwin':
Expand Down
10 changes: 9 additions & 1 deletion test/slow/api_spec_slow.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ describe(`electron-forge API (with installer=${installer.substr(12)})`, () => {
testMakeTarget(maker, false, targetOptionFetcher);
}

describe('make', async () => {
describe('make', () => {
it('throws an error when given an unrecognized platform', async () => {
await expect(forge.make({ dir, platform: 'dos' })).to.eventually.be.rejectedWith(/invalid platform/);
});
Expand All @@ -292,6 +292,14 @@ describe(`electron-forge API (with installer=${installer.substr(12)})`, () => {
skipPackage: true,
})).to.eventually.be.rejectedWith(/incompatible with this version/);
});

it('should succeed when provided comma seperated arches', async () => {
// Darwin only has x64 so we can't do this test on that platform
await forge.make({
dir,
arch: process.platform === 'darwin' ? 'x64' : 'ia32,x64',
});
});
});
});

Expand Down

0 comments on commit 9c69b08

Please sign in to comment.