Skip to content

Commit

Permalink
fix: race condition with external binary download (electron#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere authored Jan 23, 2020
1 parent 2d34194 commit 42404dc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/e-init.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,16 @@ try {
const opts = { stdio: 'inherit' };
childProcess.execFileSync('node', [e, 'use', name], opts);

// (maybe) run sync to ensure external binaries are downloaded
if (program.bootstrap) {
childProcess.execFileSync('node', [e, 'sync', '-v'], opts);
}

// maybe authenticate with Goma
if (config.goma) goma.auth(config.root);

// maybe bootstrap
// (maybe) build Electron
if (program.bootstrap) {
childProcess.execFileSync('node', [e, 'sync', '-v'], opts);
childProcess.execFileSync('node', [e, 'build'], opts);
}
} catch (e) {
Expand Down

0 comments on commit 42404dc

Please sign in to comment.