Skip to content
Permalink
Browse files

fix(importer): if no electron was found install the latest version by…

… default

Fixes #114
  • Loading branch information
MarshallOfSound authored and malept committed Jan 31, 2017
1 parent a3e4331 commit c8b12fbf7e851554d61d35db21b1b0b55219c574
Showing with 14 additions and 14 deletions.
  1. +14 −14 src/api/import.js
@@ -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 || {};

0 comments on commit c8b12fb

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