summaryrefslogtreecommitdiff
path: root/ghc
diff options
context:
space:
mode:
authorThomas Miedema <thomasmiedema@gmail.com>2015-07-04 11:57:44 +0200
committerThomas Miedema <thomasmiedema@gmail.com>2015-07-04 15:49:10 +0200
commitaa778c8e5142b5a30905be12062cf443268db7ae (patch)
tree334cefc76786e2c3e6fff4f42cab6a5202ae418b /ghc
parenta4b03428e402b36ba2d36da34bcb7465f603724d (diff)
downloadhaskell-aa778c8e5142b5a30905be12062cf443268db7ae.tar.gz
Comments only [skip ci]
Follow up to 124f3999d78d8ef6b093e4f1bb1dcef87e4283da.
Diffstat (limited to 'ghc')
-rw-r--r--ghc/InteractiveUI.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/ghc/InteractiveUI.hs b/ghc/InteractiveUI.hs
index d392327922..3912198ed1 100644
--- a/ghc/InteractiveUI.hs
+++ b/ghc/InteractiveUI.hs
@@ -597,6 +597,10 @@ nextInputLine show_prompt is_tty
checkFileAndDirPerms :: FilePath -> IO Bool
checkFileAndDirPerms file = do
file_ok <- checkPerms file
+ -- Do not check dir perms when .ghci doesn't exist, otherwise GHCi will
+ -- print some confusing and useless warnings in some cases (e.g. in
+ -- travis). Note that we can't add a test for this, as all ghci tests should
+ -- run with -ignore-dot-ghci, which means we never get here.
if file_ok then checkPerms (getDirectory file) else return False
where
getDirectory f = case takeDirectory f of