From: Michael Orlitzky Date: Mon, 27 Jan 2014 20:21:18 +0000 (-0500) Subject: Fix feed_hosts command-line parsing. X-Git-Tag: 0.0.6~1 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=93702736986b10815324647bb002ab2c269afec0;p=dead%2Fhtsn.git Fix feed_hosts command-line parsing. --- diff --git a/src/CommandLine.hs b/src/CommandLine.hs index adbb0d8..f2ee1b2 100644 --- a/src/CommandLine.hs +++ b/src/CommandLine.hs @@ -21,6 +21,7 @@ import System.Console.CmdArgs ( import Paths_htsn (version) import Data.Version (showVersion) +import FeedHosts ( FeedHosts(..) ) import OptionalConfiguration ( OptionalConfiguration(..) ) -- | The description of the program, displayed as part of the help. @@ -92,11 +93,13 @@ username_help = arg_spec :: OptionalConfiguration arg_spec = OptionalConfiguration { + daemonize = def &= typ "BOOL" &= help daemonize_help, + -- Use an empty list for feed_hosts since cmdargs will appends to -- the default when the user supplies feed hosts. If he specifies -- any, those are all we should use. - daemonize = def &= typ "BOOL" &= help daemonize_help, - feed_hosts = def &= typ "HOSTNAMES" &= args, + feed_hosts = FeedHosts [] &= typ "HOSTNAMES" &= args, + log_file = def &= typFile &= help log_file_help, log_level = def &= typ "LEVEL" &= help log_level_help, output_directory = def &= typDir &= help output_directory_help,