Browse Source

Fixed issue #27

<argument>/<arguments> should be optional
Kohsuke Kawaguchi 11 years ago
parent
commit
ed0633b53f
1 changed files with 2 additions and 10 deletions
  1. 2 10
      ServiceDescriptor.cs

+ 2 - 10
ServiceDescriptor.cs

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