From c542409b1703870923c782556cb19280af76ff46 Mon Sep 17 00:00:00 2001 From: kohsuke Date: Tue, 9 Feb 2010 19:24:13 +0000 Subject: [PATCH] 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 --- Main.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Main.cs b/Main.cs index 40e073e..a4c46a4 100644 --- a/Main.cs +++ b/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; } }