diff --git a/ghc/driver/Main.hs b/ghc/driver/Main.hs index 7120b931a2b19e8a687c375cb6ac13e499012dc6..7bcb9d00dd41dbcdb7af920656782ca2a60acc3e 100644 --- a/ghc/driver/Main.hs +++ b/ghc/driver/Main.hs @@ -1690,7 +1690,7 @@ run_something phase_name cmd unless n $ do -- and run it! - exit_code <- system ("sh -c \"" ++ cmd ++ "\"") `catchAllIO` + exit_code <- system cmd `catchAllIO` (\e -> throwDyn (PhaseFailed phase_name (ExitFailure 1))) if exit_code /= ExitSuccess