Skip to content

Commit

Permalink
removed file exist check
Browse files Browse the repository at this point in the history
  • Loading branch information
ankurparihar committed Apr 22, 2022
1 parent 37de0d8 commit e65c487
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions install/libvips.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,10 @@ try {
libvips.log(`Using cached ${tarPathCache}`);
extractTarball(tarPathCache, platformAndArch);
} else if (localLibvipsDir) {
const tarPathLocal = path.join(path.resolve(localLibvipsDir), `v${minimumLibvipsVersionLabelled}`, tarFilename);
// If localLibvipsDir is given try to use binaries from local directory
if (fs.existsSync(tarPathLocal)) {
console.log(`Using local libvips from ${tarPathLocal}`);
extractTarball(tarPathLocal, platformAndArch);
} else {
fail(new Error(`Unable to use local libvips from ${tarPathLocal}`));
}
const tarPathLocal = path.join(path.resolve(localLibvipsDir), `v${minimumLibvipsVersionLabelled}`, tarFilename);
libvips.log(`Using local libvips from ${tarPathLocal}`);
extractTarball(tarPathLocal, platformAndArch);
} else {
const url = distBaseUrl + tarFilename;
libvips.log(`Downloading ${url}`);
Expand Down

0 comments on commit e65c487

Please sign in to comment.