Skip to content

Commit

Permalink
fix minor problem with npm path
Browse files Browse the repository at this point in the history
  • Loading branch information
jfromaniello committed Apr 6, 2012
1 parent 8c79375 commit fc58c8f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions bin/winser
Expand Up @@ -16,7 +16,7 @@ String.prototype.supplant = function (o) {
}; };


program program
.version('0.0.3') .version('0.0.4')
.option('-i, --install', 'install the node application as a windows service') .option('-i, --install', 'install the node application as a windows service')
.option('-r, --remove', 'remove the windows service for the node application') .option('-r, --remove', 'remove the windows service for the node application')
.parse(process.argv); .parse(process.argv);
Expand Down Expand Up @@ -52,9 +52,10 @@ sequence
}) })
.then(function(next, err, pkg){ .then(function(next, err, pkg){
exec("where npm", function(err, r){ exec("where npm", function(err, r){
next(err, pkg, r.trim().split("\r\n").filter(function(npm){ var npmPath = r.trim().split("\r\n").filter(function(npm){
return npm.substring(-4) === ".cmd"; return npm.substr(-4) === ".cmd";
})[0]); })[0];
next(err, pkg, npmPath);
}); });
}) })
.then(function(next, err, pkg, npmLocation){ .then(function(next, err, pkg, npmLocation){
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{ {
"name": "winser", "name": "winser",
"version": "0.0.3", "version": "0.0.4",
"description": "Run a node.js application as a window service using nssm.", "description": "Run a node.js application as a window service using nssm.",
"keywords": ["windows", "services", "service", "daemon"], "keywords": ["windows", "services", "service", "daemon"],
"homepage": "https://github.com/jfromaniello/winser", "homepage": "https://github.com/jfromaniello/winser",
Expand Down

0 comments on commit fc58c8f

Please sign in to comment.