Skip to content

Commit

Permalink
Better handling of user interrupts (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
sol committed Nov 3, 2023
1 parent 3c4852f commit 53fe9e3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.cabal linguist-generated
/examples/init/foo.cabal -linguist-generated
1 change: 1 addition & 0 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
packages: garn.cabal
tests: True
4 changes: 2 additions & 2 deletions src/Garn.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module Garn
)
where

import Control.Exception (catch)
import Control.Exception (catch, throwIO)
import Control.Monad (forM_, when)
import Development.Shake (Exit (Exit), cmd)
import Garn.Common (currentSystem, nixArgs)
Expand Down Expand Up @@ -48,7 +48,7 @@ runWith env (WithGarnTsOpts garnConfig opts) = do
case opts of
Gen -> pure ()
Run (CommandOptions {..}) argv -> do
callProcess "nix" $ ["run"] <> nixArgs <> [".#" <> asNixFacing target, "--"] <> argv
rawSystem "nix" (["run"] <> nixArgs <> [".#" <> asNixFacing target, "--"] <> argv) >>= throwIO
Enter (CommandOptions {..}) -> do
hPutStrLn stderr $
"[garn] Entering "
Expand Down

0 comments on commit 53fe9e3

Please sign in to comment.