Skip to content

Commit

Permalink
Add version to CLI header.
Browse files Browse the repository at this point in the history
  • Loading branch information
damianfral committed Apr 1, 2023
1 parent ca9fc5a commit 4f30223
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/GitHub/CLI.hs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import Options.Applicative.Types
import Options.Generic
import Relude hiding (sort)
import qualified Turtle
import Data.Version (showVersion)
import Paths_github_ls

--------------------------------------------------------------------------------

Expand Down Expand Up @@ -199,7 +201,13 @@ runOptions Options {..} auth = do
Just s -> V.modify (sortReposBy s) repos

runCLI = do
options <- unwrapRecord "github-ls - List your github repositories"
options <-
unwrapRecord $
unwords
[ "github-ls",
"v" <> pack (showVersion version),
" List your github repositories"
]
token <- runMaybeT $ MaybeT getAuthToken <|> MaybeT (login >> getAuthToken)
case token of
Nothing -> log "No auth" >> exitFailure
Expand Down

0 comments on commit 4f30223

Please sign in to comment.