Permalink
Browse files

fix issue with multiples npm in the path

  • Loading branch information...
1 parent d2bab5f commit 8c79375ff4990873452ff3274ec4c51c38d35242 @jfromaniello committed Apr 6, 2012
Showing with 19 additions and 4 deletions.
  1. +2 −1 .gitignore
  2. +4 −2 bin/winser
  3. +13 −1 package.json
View
@@ -1,2 +1,3 @@
node_modules/*
-winser*tgz
+winser*tgz
+npm-debug.log
View
@@ -16,7 +16,7 @@ String.prototype.supplant = function (o) {
};
program
- .version('0.0.1')
+ .version('0.0.3')
.option('-i, --install', 'install the node application as a windows service')
.option('-r, --remove', 'remove the windows service for the node application')
.parse(process.argv);
@@ -52,7 +52,9 @@ sequence
})
.then(function(next, err, pkg){
exec("where npm", function(err, r){
- next(err, pkg, r.trim());
+ next(err, pkg, r.trim().split("\r\n").filter(function(npm){
+ return npm.substring(-4) === ".cmd";
+ })[0]);
});
})
.then(function(next, err, pkg, npmLocation){
View
@@ -1,6 +1,18 @@
{
"name": "winser",
- "version": "0.0.1",
+ "version": "0.0.3",
+ "description": "Run a node.js application as a window service using nssm.",
+ "keywords": ["windows", "services", "service", "daemon"],
+ "homepage": "https://github.com/jfromaniello/winser",
+ "author": {
+ "name" : "Jose Fernando Romaniello",
+ "email" : "jfromaniello@gmail.com",
+ "url" : "http://joseoncode.com/"
+ },
+ "repository": {
+ "type" : "git",
+ "url" : "git://github.com/jfromaniello/winser.git"
+ },
"private": false,
"dependencies": {
"sequence" : "*",

0 comments on commit 8c79375

Please sign in to comment.