Commit 3874ac47 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FIX] clean option name.

parent 940cb0e2
...@@ -36,11 +36,12 @@ instance ParseField Mode ...@@ -36,11 +36,12 @@ instance ParseField Mode
instance ParseFields Mode instance ParseFields Mode
data MyOptions w = MyOptions { run :: w ::: Mode <?> "Possible modes: Dev | Mock | Prod" data MyOptions w = MyOptions { run :: w ::: Mode <?> "Possible modes: Dev | Mock | Prod"
, port :: w ::: Maybe Int <?> "By default: 8008" , port :: w ::: Maybe Int <?> "By default: 8008"
, iniFile :: w ::: Maybe Text <?> "Example file: gargantext.ini" , ini :: w ::: Maybe Text <?> "Ini-file path of gargantext.ini"
} }
deriving (Generic) deriving (Generic)
instance ParseRecord (MyOptions Wrapped) instance ParseRecord (MyOptions Wrapped)
deriving instance Show (MyOptions Unwrapped) deriving instance Show (MyOptions Unwrapped)
...@@ -59,7 +60,7 @@ main = do ...@@ -59,7 +60,7 @@ main = do
Prod -> startGargantext myPort' (unpack myIniFile') Prod -> startGargantext myPort' (unpack myIniFile')
where where
myIniFile' = case myIniFile of myIniFile' = case myIniFile of
Nothing -> panic "Need gargantext.ini file" Nothing -> panic "For Prod mode, you need to fill a gargantext.ini file"
Just i -> i Just i -> i
Mock -> startGargantextMock myPort' Mock -> startGargantextMock myPort'
_ -> startGargantextMock myPort' _ -> startGargantextMock myPort'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment