summaryrefslogtreecommitdiff
path: root/ghc
diff options
context:
space:
mode:
authorVikas Menon <menonvikas@gmail.com>2015-04-07 15:39:44 +0200
committerThomas Miedema <thomasmiedema@gmail.com>2015-04-07 15:42:47 +0200
commitb972de0365f94e1be9d78537152eee969dc5f4cb (patch)
tree516062b643368601826a4ebf2c4c3fccc738568e /ghc
parent0622970917cbebce01ccc1e4bfe9cbc75ab86ecf (diff)
downloadhaskell-b972de0365f94e1be9d78537152eee969dc5f4cb.tar.gz
Suggest how to fix .ghci when it is group writeable (#8248)
``` chmod 664 $PATH_TO_GHCI_CONF/.ghci ``` Run ghci. You will now get a warning + a suggestion: ``` *** WARNING: $PATH_TO_GHCI_CONF/.ghci is writable by someone else, IGNORING! Suggested fix: execute 'chmod 644 $PATH_TO_GHCI_CONF/.ghci' ``` Execute fix and the warning should disappear. Reviewed By: mboes, thomie Differential Revision: https://phabricator.haskell.org/D805
Diffstat (limited to 'ghc')
-rw-r--r--ghc/InteractiveUI.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/ghc/InteractiveUI.hs b/ghc/InteractiveUI.hs
index 9941a60f5b..fc2883f837 100644
--- a/ghc/InteractiveUI.hs
+++ b/ghc/InteractiveUI.hs
@@ -611,8 +611,10 @@ checkPerms name =
groupWriteMode /= mode `intersectFileModes` groupWriteMode &&
otherWriteMode /= mode `intersectFileModes` otherWriteMode
unless ok $
+ -- #8248: Improving warning to include a possible fix.
putStrLn $ "*** WARNING: " ++ name ++
- " is writable by someone else, IGNORING!"
+ " is writable by someone else, IGNORING!" ++
+ "\nSuggested fix: execute 'chmod 644 " ++ name ++ "'"
return ok
#endif