Commit b972de03 authored by whisky's avatar whisky Committed by thomie
Browse files

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
parent 06229709
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment