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

Commit 9c6933f

Browse files
committed
Merge pull request #1435 from xzyfer/fix/binary-verification
Fix a regression in binary verification
2 parents 7c24716 + 0fa5e5e commit 9c6933f

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

lib/extensions.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ function getBinaryUrl() {
167167
* callers wants to throw if file not exists before
168168
* returning.
169169
*
170-
* @param {Boolean} throwIfNotExists
171170
* @api public
172171
*/
173172

@@ -189,6 +188,13 @@ function getBinaryPath() {
189188
return binaryPath;
190189
}
191190

191+
/**
192+
* Does the supplied binary path exist
193+
*
194+
* @param {String} binaryPath
195+
* @api public
196+
*/
197+
192198
function hasBinary(binaryPath) {
193199
return fs.existsSync(binaryPath);
194200
}

scripts/install.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ function applyProxy(options, cb) {
8181
*/
8282

8383
function checkAndDownloadBinary() {
84-
if (sass.getBinaryPath()) {
84+
if (sass.hasBinary(sass.getBinaryPath())) {
8585
return;
8686
}
8787

@@ -97,7 +97,7 @@ function checkAndDownloadBinary() {
9797
return;
9898
}
9999

100-
console.log('Binary downloaded and installed at', sass.binaryPath());
100+
console.log('Binary downloaded and installed at', sass.getBinaryPath());
101101
});
102102
});
103103
}

0 commit comments

Comments
 (0)