Skip to content

Commit

Permalink
Add ESBUILD_BIN_PATH (#881)
Browse files Browse the repository at this point in the history
  • Loading branch information
sushain97 authored Feb 25, 2021
1 parent aa64f5c commit f88eec1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,10 @@ function installDirectly(name: string) {
if (process.env.ESBUILD_BIN_PATH_FOR_TESTS) {
fs.unlinkSync(binPath);
fs.symlinkSync(process.env.ESBUILD_BIN_PATH_FOR_TESTS, binPath);
validateBinaryVersion(process.env.ESBUILD_BIN_PATH_FOR_TESTS);
validateBinaryVersion(binPath);
} else if (process.env.ESBUILD_BIN_PATH) {
fs.copyFileSync(process.env.ESBUILD_BIN_PATH, binPath);
validateBinaryVersion(binPath);
} else {
installBinaryFromPackage(name, 'bin/esbuild', binPath)
.catch(e => setImmediate(() => { throw e; }));
Expand Down

0 comments on commit f88eec1

Please sign in to comment.