Browse Source

env variable expansion needs to happen first if we want to really detect whitespace in arguments correctly

git-svn-id: https://svn.kenai.com/svn/winsw~subversion/trunk@46 c8b2a3fe-9b5b-6a51-a37e-dc31b0e308fa
kohsuke 16 years ago
parent
commit
c542409b17
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Main.cs

+ 2 - 2
Main.cs

@@ -196,7 +196,7 @@ namespace winsw
 
                 foreach (XmlNode argument in dom.SelectNodes("//" + tagName))
                 {
-                    string token = argument.InnerText;
+                    string token = Environment.ExpandEnvironmentVariables(argument.InnerText);
                     if (token.StartsWith("\"") && token.EndsWith("\""))
                     {
                         // for backward compatibility, if the argument is already quoted, leave it as is.
@@ -213,7 +213,7 @@ namespace winsw
                     arguments += " " + token;
                 }
 
-                return Environment.ExpandEnvironmentVariables(arguments);
+                return arguments;
             }
         }