Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions app/Spago.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import qualified Paths_spago as Pcli
import Main.Utf8 (withUtf8)
import Spago.CLI (Command(..))

import qualified Data.Text as Text
import qualified System.Environment as Env
import qualified Spago.Build
import qualified Spago.GitHub
Expand All @@ -30,7 +31,7 @@ main = withUtf8 $ do
Env.setEnv "GIT_TERMINAL_PROMPT" "0"

(command, globalOptions@GlobalOptions{..})
<- CLI.options "Spago - manage your PureScript projects" CLI.parser
<- CLI.optionsExt "" "" "Spago - manage your PureScript projects" (Text.pack spagoVersion) CLI.parser

Run.withEnv globalOptions $
case command of
Expand All @@ -45,7 +46,7 @@ main = withUtf8 $ do
Login
-> Spago.GitHub.login
Version
-> printVersion
-> CLI.echo spagoVersion
Path whichPath buildOptions
-> Path.showPaths buildOptions whichPath
Repl replPackageNames paths pursArgs depsOnly
Expand Down Expand Up @@ -98,5 +99,5 @@ main = withUtf8 $ do


-- | Print out Spago version
printVersion :: RIO env ()
printVersion = CLI.echo (showVersion Pcli.version)
spagoVersion :: String
spagoVersion = showVersion Pcli.version
2 changes: 1 addition & 1 deletion src/Spago/CLI.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Spago.CLI
( module Spago.CLI
, CLI.options
, CLI.optionsExt
) where

import Spago.Prelude
Expand Down
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ extra-deps:
- serialise-0.2.1.0
- Win32-2.5.4.1@sha256:e623a1058bd8134ec14d62759f76cac52eee3576711cb2c4981f398f1ec44b85
- Glob-0.10.0
- turtle-1.5.14
- turtle-1.5.18
- libyaml-0.1.1.0@sha256:b3fcd8c44622c75e054c2267f3fec39a58a311748000310cbc8257a4683d3f02,2090
- yaml-0.11.1.0@sha256:3dc3ed2760f6d1bb280b3a2da29f9032f508d57bfc545fb16b1424f2a5560641,5079
- th-lift-0.8.0.1@sha256:cceb81b12c0580e02a7a3898b6d60cca5e1be080741f69ddde4f12210d8ba7ca,1960
Expand Down
6 changes: 3 additions & 3 deletions stack.yaml.lock
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,12 @@ packages:
original:
hackage: Glob-0.10.0
- completed:
hackage: turtle-1.5.14@sha256:be0f9d3102e11458554d17f581a69984e511f15d6d51a4c4816743783576b566,4908
hackage: turtle-1.5.18@sha256:17342a1829adaaeed9bc5b61fc3da7a163674a90148bf71c5eec937d54568ccb,4843
pantry-tree:
size: 1114
sha256: 191eed87a5e8713a212ddfe4c5f4b819d07771c56becd92b8b5c6119f7ddad5d
sha256: d4b57091947356710e54ecc18f215c6fe0012649a9cffe869b0e637d3e83b7cf
original:
hackage: turtle-1.5.14
hackage: turtle-1.5.18
- completed:
hackage: libyaml-0.1.1.0@sha256:b3fcd8c44622c75e054c2267f3fec39a58a311748000310cbc8257a4683d3f02,2090
pantry-tree:
Expand Down