Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Fix a regression in binary verification #1435

Merged
merged 1 commit into from
Mar 31, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion lib/extensions.js
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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