Skip to content

Commit

Permalink
Fix a regression in binary verification
Browse files Browse the repository at this point in the history
A regression introduced in 22c560c broke binary verification
causing the binary to always be built locally.

Fixes #1434
  • Loading branch information
xzyfer committed Mar 31, 2016
1 parent d76923b commit 0fa5e5e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion lib/extensions.js
Expand Up @@ -167,7 +167,6 @@ function getBinaryUrl() {
* callers wants to throw if file not exists before
* returning.
*
* @param {Boolean} throwIfNotExists
* @api public
*/

Expand All @@ -189,6 +188,13 @@ function getBinaryPath() {
return binaryPath;
}

/**
* Does the supplied binary path exist
*
* @param {String} binaryPath
* @api public
*/

function hasBinary(binaryPath) {
return fs.existsSync(binaryPath);
}
Expand Down
4 changes: 2 additions & 2 deletions scripts/install.js
Expand Up @@ -81,7 +81,7 @@ function applyProxy(options, cb) {
*/

function checkAndDownloadBinary() {
if (sass.getBinaryPath()) {
if (sass.hasBinary(sass.getBinaryPath())) {
return;
}

Expand All @@ -97,7 +97,7 @@ function checkAndDownloadBinary() {
return;
}

console.log('Binary downloaded and installed at', sass.binaryPath());
console.log('Binary downloaded and installed at', sass.getBinaryPath());
});
});
}
Expand Down

0 comments on commit 0fa5e5e

Please sign in to comment.