summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci/shell.hs
blob: 4c08a8f34987e961373d140b1c073456b47df524 (plain)
1
2
3
4
5
6
7
8
9
-- Used to present a consistent shell view for :! commands in GHCi
-- scripts.  We're assuming that sh is in the path and that it
-- is a Bourne-compatible shell.

import System.Exit
import System.Process (rawSystem)

shell :: String -> IO ExitCode
shell s = rawSystem "sh" ["-c", s]