Skip to content

Commit

Permalink
bugfix: Remove <DkMLHome>/bin from PATH in with-dkml
Browse files Browse the repository at this point in the history
It is the responsibility of the real tools themselves, like `opam-real`,
to manipulate the PATHs.

Part of diskuv/dkml-installer-ocaml#77
  • Loading branch information
jonahbeckford committed Nov 29, 2023
1 parent 9c537f6 commit 085c5d2
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/with-dkml/cmdline.ml
Original file line number Diff line number Diff line change
Expand Up @@ -368,20 +368,6 @@ let create_and_setenv_if_necessary ~has_dkml_mutating_ancestor_process () =
in
Ok (abs_cmd_p, real_exe)
in
(* Always add DkML home binaries like `ocaml` to the end of the PATH.
Commands like `opam exec -- ocamlc -config` should find [ocamlc].
But do not place at the start of the PATH because we want the user
(or opam, etc.) to be able to override it. *)
let* dkmlhome_dir = Lazy.force Dkml_runtimelib.get_dkmlhome_dir_or_default in
let* () =
when_dir_exists_append_pathlike_env ~envvar:"PATH"
Fpath.(dkmlhome_dir / "usr" / "bin")
in
let* () =
when_dir_exists_append_pathlike_env ~envvar:"PATH"
Fpath.(dkmlhome_dir / "bin")
in
let+ cmd_and_args =
match Array.to_list Sys.argv with
(* CMDLINE_A FORM *)
Expand Down

0 comments on commit 085c5d2

Please sign in to comment.