;cli: fix "hledger CMD --info" with older info

This should open the info node for CMD, but was giving an
error with info 4.8 on macs. Now it's more robust.
This commit is contained in:
Simon Michael 2021-03-07 17:40:50 -08:00
parent 36aa01f67a
commit 72a9b612c1

View File

@ -131,5 +131,5 @@ runInfoForTopic tool mtopic =
withSystemTempFile ("hledger-"++tool++".info") $ \f h -> do
BC.hPutStrLn h $ toolDocInfo tool
hClose h
callCommand $ dbg1 "info command" $
"info " ++ f ++ maybe "" (printf " -n '%s'") mtopic
callCommand $ dbg1 "info command" $
"info -f " ++ f ++ maybe "" (printf " -n '%s'") mtopic