Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Fix issues with project names with spaces in them #5

Merged
merged 1 commit into from over 1 year ago

2 participants

jdarling José F. Romaniello
jdarling

This fixes issues where a project name has spaces in it, it also patches around the fs.existsSync and path.existsSync warning.

jdarling Fix issues with project names with spaces in them
Fix issues with project names with spaces in them
56f0d4e
José F. Romaniello jfromaniello merged commit 28c448f into from
José F. Romaniello jfromaniello closed this
José F. Romaniello
Owner

hi! I merged and published the new version to npm (0.0.11)

thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Aug 30, 2012
jdarling Fix issues with project names with spaces in them
Fix issues with project names with spaces in them
56f0d4e
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 4 additions and 3 deletions. Show diff stats Hide diff stats

  1. 7  bin/winser
7  bin/winser
@@ -42,7 +42,7 @@ if (process.platform !== "win32"){
42 42
     return;
43 43
 }
44 44
 
45  
-if (!path.existsSync(path.join(program.path, "package.json"))){
  45
+if (!(fs.existsSync||path.existsSync)(path.join(program.path, "package.json"))){
46 46
     log(program.path + " doesn't seems to be a node application path.\nIt doesn't contains a package.json file.");
47 47
     process.exit();
48 48
     return;
@@ -68,6 +68,7 @@ sequence
68 68
             var message = program.install ? "continue installing " + appName + " as a service? " :
69 69
                                             "continue uninstalling the " + appName + " service? ";
70 70
             program.confirm(message, function(ok){
  71
+                process.stdin.pause(); //i think this program.confirm thing doesnt close the stdin properly
71 72
                 if(ok){
72 73
                     next();
73 74
                 }else{
@@ -91,7 +92,7 @@ sequence
91 92
     })
92 93
     .then(function(next, err, npmLocation){ 
93 94
         if(program.install){
94  
-            exec('{binfolder}\\nssm.exe install {serviceName} "{npmLocation}" start "{appFolder}"'.supplant({
  95
+            exec('\"{binfolder}\\nssm.exe\" install {serviceName} "{npmLocation}" start "\\"{appFolder}\\""'.supplant({
95 96
                         binfolder: __dirname,
96 97
                         serviceName: appName,
97 98
                         npmLocation: npmLocation,
@@ -105,7 +106,7 @@ sequence
105 106
                 next();
106 107
             });
107 108
         }else if(program.remove){ 
108  
-            exec("{binfolder}\\nssm.exe remove {serviceName} confirm".supplant({
  109
+            exec("\"{binfolder}\\nssm.exe\" remove {serviceName} confirm".supplant({
109 110
                 binfolder: __dirname,
110 111
                 serviceName: appName
111 112
             }), function(err,stdout, stderr){
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.