Permalink
Browse files

Fix issues with project names with spaces in them

Fix issues with project names with spaces in them
  • Loading branch information...
1 parent 20d70b7 commit 56f0d4ed3c4ca8ccbf3df27d52fcb7e6c2131589 @jdarling jdarling committed Aug 30, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 bin/winser
View
@@ -42,7 +42,7 @@ if (process.platform !== "win32"){
return;
}
-if (!path.existsSync(path.join(program.path, "package.json"))){
+if (!(fs.existsSync||path.existsSync)(path.join(program.path, "package.json"))){
log(program.path + " doesn't seems to be a node application path.\nIt doesn't contains a package.json file.");
process.exit();
return;
@@ -68,6 +68,7 @@ sequence
var message = program.install ? "continue installing " + appName + " as a service? " :
"continue uninstalling the " + appName + " service? ";
program.confirm(message, function(ok){
+ process.stdin.pause(); //i think this program.confirm thing doesnt close the stdin properly
if(ok){
next();
}else{
@@ -91,7 +92,7 @@ sequence
})
.then(function(next, err, npmLocation){
if(program.install){
- exec('{binfolder}\\nssm.exe install {serviceName} "{npmLocation}" start "{appFolder}"'.supplant({
+ exec('\"{binfolder}\\nssm.exe\" install {serviceName} "{npmLocation}" start "\\"{appFolder}\\""'.supplant({
binfolder: __dirname,
serviceName: appName,
npmLocation: npmLocation,
@@ -105,7 +106,7 @@ sequence
next();
});
}else if(program.remove){
- exec("{binfolder}\\nssm.exe remove {serviceName} confirm".supplant({
+ exec("\"{binfolder}\\nssm.exe\" remove {serviceName} confirm".supplant({
binfolder: __dirname,
serviceName: appName
}), function(err,stdout, stderr){

0 comments on commit 56f0d4e

Please sign in to comment.