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 | main = do | ||||||
|   args <- getArgs >>= parseArgsOrExit doc |   args <- getArgs >>= parseArgsOrExit doc | ||||||
|   when (isPresent args (shortOption 'h') || isPresent args (longOption "help")) $ exitWithUsage 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 |   when (isPresent args (longOption "swagger")) $ BL8.putStrLn (encode swaggerSpec) >> exitSuccess | ||||||
|   let |   let | ||||||
|     defh = "127.0.0.1" |     defh = "127.0.0.1" | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user