diff --git a/hooks/alloy.js b/hooks/alloy.js index 902957993..cc0417e8f 100644 --- a/hooks/alloy.js +++ b/hooks/alloy.js @@ -83,6 +83,7 @@ exports.init = function (logger, config, cli, appc) { // we have no clue where alloy is installed, so we're going to subprocess // alloy and hope it's in the system path or a well known place var paths = {}; + var locatorCmd = process.platform === 'win32' ? 'where' : 'which'; parallel(this, ['alloy', 'node'].map(function (bin) { return function (done) { var envName = 'ALLOY_' + (bin === 'node' ? 'NODE_' : '') + 'PATH'; @@ -94,7 +95,7 @@ exports.init = function (logger, config, cli, appc) { paths.alloy = 'alloy.cmd'; done(); } else { - exec('which ' + bin, function (err, stdout, strerr) { + exec(locatorCmd + ' ' + bin, function (err, stdout, strerr) { if (!err) { paths[bin] = stdout.trim(); done();