File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # 0.7.1
2+
3+ * Client gives non zero exit status for non-existent pages.
4+
15# 0.7.0
26
37* Make it obey --language (-L) option.
Original file line number Diff line number Diff line change @@ -11,11 +11,12 @@ import Data.List (intercalate)
1111import Data.Semigroup ((<>) )
1212import qualified Data.Set as Set
1313import Data.Version (showVersion )
14- import System.IO (stdout )
14+ import System.IO (stdout , stderr , hPutStrLn )
1515import Options.Applicative
1616import Paths_tldr (version )
1717import System.Directory
1818import System.Environment (getArgs , getExecutablePath , lookupEnv )
19+ import System.Exit (exitFailure )
1920import System.FilePath
2021import System.Process.Typed
2122import Data.Char (toLower )
@@ -196,7 +197,9 @@ handleTldrOpts opts@TldrOpts {..} = do
196197 Just path -> renderPage path stdout
197198 Nothing -> do
198199 if checkLocale locale
199- then putStrLn (" No tldr entry for " <> (intercalate " " pages))
200+ then do
201+ hPutStrLn stderr (" No tldr entry for " <> (intercalate " " pages))
202+ exitFailure
200203 else handleTldrOpts
201204 (opts
202205 { tldrAction =
Original file line number Diff line number Diff line change 11name : tldr
2- version : ' 0.7.0 '
2+ version : ' 0.7.1 '
33synopsis : Haskell tldr client
44description : |
55 Haskell tldr client with support for viewing tldr pages. Has offline
You can’t perform that action at this time.
0 commit comments