Skip to content

Commit

Permalink
Print extra interpreter arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
sol committed Aug 22, 2024
1 parent 18ad5e2 commit cd01584
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- '9.8'
- '9.10'
include:
- os: macos-latest
- os: macos-12
ghc: system
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -55,17 +55,14 @@ jobs:
- shell: bash
run: cabal update

- shell: bash
run: cabal configure --enable-tests --enable-benchmarks

- shell: bash
run: cabal build all

- shell: bash
run: echo | cabal repl sensei --build-depends hspec-meta

- shell: bash
run: cabal exec -- "${PWD}/$(find dist-newstyle/ -name spec -type f)" --times --print-slow
run: cabal exec -- $(cabal list-bin spec) --times --print-slow
env:
HSPEC_OPTIONS: --color

Expand Down
5 changes: 5 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@ package sensei
ghc-options: -Werror

tests: True

source-repository-package
type: git
location: https://github.com/sol/hinotify/
tag: 2131698f86939542c7df2cf3e60b40cc7e42819c
10 changes: 8 additions & 2 deletions src/Run.hs
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,17 @@ runWith RunArgs {..} = do
, afterReload = config.senseiHooksAfterReload
}

go :: [String] -> IO ()
go extraArgs = do
status <- withSession sessionConfig (extraArgs <> args) $ \ session -> do
let
triggerAction = saveOutput (trigger session hooks)
triggerAllAction = saveOutput (triggerAll session hooks)
printExtraArgs :: IO ()
printExtraArgs = forM_ extraArgs $ \ arg -> do
sessionConfig.configEcho . encodeUtf8 . withColor Red $ arg <> "\n"

triggerAction = saveOutput (trigger session hooks <* printExtraArgs)
triggerAllAction = saveOutput (triggerAll session hooks <* printExtraArgs)

triggerAction
processQueue runCleanupAction (sessionConfig.configEcho . encodeUtf8) dir queue triggerAllAction triggerAction
case status of
Expand Down

0 comments on commit cd01584

Please sign in to comment.