Skip to content
This repository was archived by the owner on Jan 10, 2025. It is now read-only.

Commit 1f85e16

Browse files
authored
[TouchOptions] Fix a few issues related to command-line parsing. (#78)
Parse command line options like we parse the corresponding environment variables (case insensitively) Also fix actually passing values to a few arguments.
1 parent 1c272a9 commit 1f85e16

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

NUnitLite/TouchRunner/TouchOptions.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ public TouchOptions ()
9696
{ "use-tcp-tunnel", "Use a TCP tunnel to connect to the host.", v => UseTcpTunnel = true },
9797
{ "enablenetwork", "Enable the network reporter.", v => EnableNetwork = true },
9898
{ "transport=", "Select transport method. Either TCP (default), HTTP or FILE.", v => Transport = v },
99-
{ "enablexml", "Enable the xml reported.", v => EnableXml = false },
100-
{ "xmlmode", "The xml mode.", v => XmlMode = (XmlMode) Enum.Parse (typeof (XmlMode), v, false) },
101-
{ "xmlversion", "The xml version.", v => XmlVersion = (XmlVersion) Enum.Parse (typeof (XmlVersion), v, false) },
99+
{ "enablexml:", "Enable the xml reported.", v => EnableXml = string.IsNullOrEmpty (v) ? true : bool.Parse (v) },
100+
{ "xmlmode=", "The xml mode.", v => XmlMode = (XmlMode) Enum.Parse (typeof (XmlMode), v, true) },
101+
{ "xmlversion=", "The xml version.", v => XmlVersion = (XmlVersion) Enum.Parse (typeof (XmlVersion), v, true) },
102102
{ "logfile=", "A path where output will be saved.", v => LogFile = v },
103103
};
104104

0 commit comments

Comments
 (0)