Skip to content

Commit

Permalink
path: add <root>/<switch>/.opam-switch/last-env to store last env files
Browse files Browse the repository at this point in the history
  • Loading branch information
rjbou committed Mar 22, 2023
1 parent 32a6a9e commit 0671844
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/format/opamPath.ml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ module Switch = struct

let environment t a = meta t a /- env_filename

let last_env t a = meta t a / "last-env"

let env_relative_to_prefix pfx = pfx / meta_dirname /- env_filename

let installed_opams t a = meta t a / "packages"
Expand Down
2 changes: 2 additions & 0 deletions src/format/opamPath.mli
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ module Switch: sig
(** Cached environment updates. *)
val environment: t -> switch -> OpamFile.Environment.t OpamFile.t

val last_env: t -> switch -> dirname

(** Like [environment], but from the switch prefix dir *)
val env_relative_to_prefix: dirname -> OpamFile.Environment.t OpamFile.t

Expand Down

0 comments on commit 0671844

Please sign in to comment.