Commit 0fa5e5eb by xzyfer

Fix a regression in binary verification

A regression introduced in 22c560c7 broke binary verification
causing the binary to always be built locally.

Fixes #1434
parent d76923b4
......@@ -167,7 +167,6 @@ function getBinaryUrl() {
* callers wants to throw if file not exists before
* returning.
*
* @param {Boolean} throwIfNotExists
* @api public
*/
......@@ -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);
}
......
......@@ -81,7 +81,7 @@ function applyProxy(options, cb) {
*/
function checkAndDownloadBinary() {
if (sass.getBinaryPath()) {
if (sass.hasBinary(sass.getBinaryPath())) {
return;
}
......@@ -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());
});
});
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment