diff options
author | Daniel Gröber <dxld@darkboxed.org> | 2015-03-12 11:55:38 +0100 |
---|---|---|
committer | Daniel Gröber <dxld@darkboxed.org> | 2015-03-12 12:02:53 +0100 |
commit | fb614e639314abe3bf3cf93667708ac6d0749644 (patch) | |
tree | d258a9a79da6400970991a50eba952461f3d8753 /Distribution | |
parent | 1025ed52821f20cffcc1cc8fa028e8074abecab6 (diff) |
Fix callProcess for process<1.2
Diffstat (limited to 'Distribution')
-rw-r--r-- | Distribution/Helper.hs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Distribution/Helper.hs b/Distribution/Helper.hs index febd4aa..a57ea93 100644 --- a/Distribution/Helper.hs +++ b/Distribution/Helper.hs @@ -202,7 +202,7 @@ writeAutogenFiles :: MonadIO m -> m () writeAutogenFiles distdir = liftIO $ do exe <- findLibexecExe "cabal-helper-wrapper" - callProcess exe [distdir, "write-autogen-files"] + callProcess' exe [distdir, "write-autogen-files"] -- | This exception is thrown by all 'runQuery' functions if the internal -- wrapper executable cannot be found. You may catch this and present the user @@ -276,3 +276,10 @@ getExecutablePath' = #else getProgName #endif + +callProcess' exe args = +#if MIN_VERSION_process(1,2,0) + callProcess exe args +#else + void $ readProcess exe args "" +#endif |