Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
sol committed Jul 15, 2024
1 parent 3a3e16b commit 9e49571
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions driver/cabal-doctest.hs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ import System.Process
import Paths_doctest (version)

main :: IO ()
main = do
args <- getArgs
main = getArgs >>= externalCommand

externalCommand :: [String] -> IO ()
externalCommand args = do
lookupEnv "CABAL" >>= \ case
Nothing -> run "cabal" args
Just cabal -> run cabal (drop 1 args)
Expand Down

0 comments on commit 9e49571

Please sign in to comment.