Make sure we're not at $HOME before sourcing local .ocamlinit

(fixes: Github #333)
This commit is contained in:
Haz 2020-09-21 22:23:36 +00:00 committed by GitHub
parent 7bc5117d34
commit 251228d677
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1479,7 +1479,7 @@ let common_init ~initial_env =
None None
) )
| None -> | None ->
if Sys.file_exists ".ocamlinit" then if Sys.file_exists ".ocamlinit" && Sys.getcwd () <> Sys.getenv "HOME" then
Some ".ocamlinit" Some ".ocamlinit"
else else
let xdg_fn = LTerm_resources.xdgbd_file ~loc:LTerm_resources.Config "utop/init.ml" in let xdg_fn = LTerm_resources.xdgbd_file ~loc:LTerm_resources.Config "utop/init.ml" in