Commit fa40bda6 by Michael Mifsud

Merge pull request #1325 from saper/process-execpath

Accept process.execPath as-is
parents 026fe07c a4619bfa
...@@ -26,27 +26,6 @@ function collectArguments(args) { ...@@ -26,27 +26,6 @@ function collectArguments(args) {
} }
/** /**
* Get Runtime Info
*
* @api private
*/
function getRuntimeInfo() {
var execPath = fs.realpathSync(process.execPath); // resolve symbolic link
var runtime = execPath
.split(/[\\/]+/).pop()
.split('.').shift();
runtime = runtime === 'nodejs' ? 'node' : runtime;
return {
name: runtime,
execPath: execPath
};
}
/**
* Get binary name. * Get binary name.
* If environment variable SASS_BINARY_NAME, * If environment variable SASS_BINARY_NAME,
* .npmrc variable sass_binary_name or * .npmrc variable sass_binary_name or
...@@ -122,7 +101,6 @@ var sass = process.sass = {}; ...@@ -122,7 +101,6 @@ var sass = process.sass = {};
sass.binaryName = getBinaryName(); sass.binaryName = getBinaryName();
sass.binaryUrl = getBinaryUrl(); sass.binaryUrl = getBinaryUrl();
sass.runtime = getRuntimeInfo();
/** /**
* Get binary path. * Get binary path.
......
...@@ -135,9 +135,9 @@ function build(options) { ...@@ -135,9 +135,9 @@ function build(options) {
return ['--', subject, '=', process.env[subject.toUpperCase()] || ''].join(''); return ['--', subject, '=', process.env[subject.toUpperCase()] || ''].join('');
})).concat(options.args); })).concat(options.args);
console.log(['Building:', process.sass.runtime.execPath].concat(args).join(' ')); console.log(['Building:', process.execPath].concat(args).join(' '));
var proc = spawn(process.sass.runtime.execPath, args, { var proc = spawn(process.execPath, args, {
stdio: [0, 1, 2] stdio: [0, 1, 2]
}); });
......
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