Skip to content

Commit

Permalink
Merge pull request #691 from feons/ALOY-1272-x
Browse files Browse the repository at this point in the history
[ALOY-1272] Building an alloy project with Titanium CLI on Windows fails 1_6_X
  • Loading branch information
Praveen Innamuri committed Jun 4, 2015
2 parents fd54ea1 + b222df0 commit 7d0bb09
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hooks/alloy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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();
Expand Down

0 comments on commit 7d0bb09

Please sign in to comment.