mirror of
https://github.com/simonmichael/hledger.git
synced 2024-09-20 02:37:12 +03:00
api: show program name in --version output, like other tools
[ci skip]
This commit is contained in:
parent
7d7c932a2d
commit
8fb0b6886c
@ -74,7 +74,7 @@ main :: IO ()
|
||||
main = do
|
||||
args <- getArgs >>= parseArgsOrExit doc
|
||||
when (isPresent args (shortOption 'h') || isPresent args (longOption "help")) $ exitWithUsage doc
|
||||
when (isPresent args (longOption "version")) $ putStrLn hledgerApiVersion >> exitSuccess
|
||||
when (isPresent args (longOption "version")) $ putStrLn ("hledger-api " ++ hledgerApiVersion) >> exitSuccess
|
||||
when (isPresent args (longOption "swagger")) $ BL8.putStrLn (encode swaggerSpec) >> exitSuccess
|
||||
let
|
||||
defh = "127.0.0.1"
|
||||
|
Loading…
Reference in New Issue
Block a user