diff --git a/src/format/opamPath.ml b/src/format/opamPath.ml index 68aea0b63ff..cefd503cc2b 100644 --- a/src/format/opamPath.ml +++ b/src/format/opamPath.ml @@ -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" diff --git a/src/format/opamPath.mli b/src/format/opamPath.mli index 116ed83939a..e6b09dc6354 100644 --- a/src/format/opamPath.mli +++ b/src/format/opamPath.mli @@ -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