From b972de0365f94e1be9d78537152eee969dc5f4cb Mon Sep 17 00:00:00 2001 From: Vikas Menon Date: Tue, 7 Apr 2015 15:39:44 +0200 Subject: 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 --- ghc/InteractiveUI.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ghc') 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 -- cgit v1.2.1