From 93702736986b10815324647bb002ab2c269afec0 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Mon, 27 Jan 2014 15:21:18 -0500 Subject: [PATCH] Fix feed_hosts command-line parsing. --- src/CommandLine.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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, -- 2.44.2