Skip to content

Commit

Permalink
fix(importer): if no electron was found install the latest version by…
Browse files Browse the repository at this point in the history
… default

Fixes #114
  • Loading branch information
MarshallOfSound authored and malept committed Feb 1, 2017
1 parent a3e4331 commit c8b12fb
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/api/import.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,22 +152,22 @@ export default async (providedOptions = {}) => {
child.on('exit', () => resolve());
});
});

await asyncOra('Installing dependencies', async () => {
d('deleting old dependencies forcefully');
await fs.remove(path.resolve(dir, 'node_modules/.bin/electron'));
await fs.remove(path.resolve(dir, 'node_modules/.bin/electron.cmd'));
await fs.remove(path.resolve(dir, 'node_modules', electronName));

d('installing dependencies');
await installDepList(dir, deps);
d('installing devDependencies');
await installDepList(dir, devDeps, true);
d('installing electron-prebuilt-compile');
await installDepList(dir, [`electron-prebuilt-compile@${electronVersion}`], false, true);
});
}

await asyncOra('Installing dependencies', async () => {
d('deleting old dependencies forcefully');
await fs.remove(path.resolve(dir, 'node_modules/.bin/electron'));
await fs.remove(path.resolve(dir, 'node_modules/.bin/electron.cmd'));
await fs.remove(path.resolve(dir, 'node_modules', electronName));

d('installing dependencies');
await installDepList(dir, deps);
d('installing devDependencies');
await installDepList(dir, devDeps, true);
d('installing electron-prebuilt-compile');
await installDepList(dir, [`electron-prebuilt-compile@${electronVersion || 'latest'}`], false, true);
});

packageJSON = await readPackageJSON(dir);

packageJSON.config = packageJSON.config || {};
Expand Down

0 comments on commit c8b12fb

Please sign in to comment.