Skip to content

Commit

Permalink
Skip install script if already installed (#91)
Browse files Browse the repository at this point in the history
The install script sometimes throws error on subsequent `yarn` installs since `yarn`
seems to invoke install scripts when it is shuffling things around. It also causes
issue for CI where the `node_modules` directory is cached across builds.
  • Loading branch information
yyx990803 authored May 7, 2020
1 parent 764109e commit efc0d0d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions npm/esbuild/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ function installPackage(package) {
env[key] = process.env[key];
}
}

if (fs.existsSync(installDir)) {
return;
}

// Run "npm install" recursively to install this specific package
fs.mkdirSync(installDir);
Expand Down

0 comments on commit efc0d0d

Please sign in to comment.