Skip to content
Permalink
Browse files

fix(importer): ensure electronName exists before resolving its path

  • Loading branch information
anulman authored and MarshallOfSound committed Feb 6, 2017
1 parent 9e064cf commit 9dcf2ec5082f74a8782f7666107ace7c74df3e27
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/api/import.js
@@ -161,7 +161,10 @@ export default async (providedOptions = {}) => {
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));

if (electronName) {
await fs.remove(path.resolve(dir, 'node_modules', electronName));
}

d('installing dependencies');
await installDepList(dir, deps);

0 comments on commit 9dcf2ec

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