Fixed issue #27

<argument>/<arguments> should be optional
pull/37/merge
Kohsuke Kawaguchi 2014-03-31 18:17:50 -07:00
parent 2ffdbde6a9
commit ed0633b53f
1 changed files with 2 additions and 10 deletions

View File

@ -190,20 +190,12 @@ namespace winsw
if (arguments == null) if (arguments == null)
{ {
var tagName = "arguments"; var argumentsNode = dom.SelectSingleNode("//arguments");
var argumentsNode = dom.SelectSingleNode("//" + tagName);
if (argumentsNode == null) if (argumentsNode == null)
{
if (AppendTags("startargument") == null)
{
throw new InvalidDataException("<" + tagName + "> is missing in configuration XML");
}
else
{ {
return ""; return "";
} }
}
return Environment.ExpandEnvironmentVariables(argumentsNode.InnerText); return Environment.ExpandEnvironmentVariables(argumentsNode.InnerText);
} }