瀏覽代碼

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 年之前
父節點
當前提交
c542409b17
共有 1 個文件被更改,包括 2 次插入2 次删除
  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;
             }
         }