Commit b28c68f0 by Michael Mifsud

Merge pull request #848 from saper/showbinpath

Show expected binary path in the error message if bindings not found
parents eaa533d6 9bae6100
...@@ -143,7 +143,7 @@ sass.getBinaryPath = function(throwIfNotExists) { ...@@ -143,7 +143,7 @@ sass.getBinaryPath = function(throwIfNotExists) {
} }
if (!fs.existsSync(binaryPath) && throwIfNotExists) { if (!fs.existsSync(binaryPath) && throwIfNotExists) {
throw new Error('`libsass` bindings not found. Try reinstalling `node-sass`?'); throw new Error(['`libsass` bindings not found in ', binaryPath, '. Try reinstalling `node-sass`?'].join(''));
} }
return binaryPath; return binaryPath;
......
...@@ -1490,7 +1490,7 @@ describe('api', function() { ...@@ -1490,7 +1490,7 @@ describe('api', function() {
assert.throws(function() { assert.throws(function() {
fs.renameSync(originalBin, renamedBin); fs.renameSync(originalBin, renamedBin);
process.sass.getBinaryPath(true); process.sass.getBinaryPath(true);
}, /`libsass` bindings not found. Try reinstalling `node-sass`?/); }, /`libsass` bindings not found/);
fs.renameSync(renamedBin, originalBin); fs.renameSync(renamedBin, originalBin);
done(); done();
......
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