Skip to content

Fix opam config subst handling of absolute paths#6936

Open
NathanReb wants to merge 2 commits into
ocaml:masterfrom
NathanReb:fix-opam-config-subst-absolute-path
Open

Fix opam config subst handling of absolute paths#6936
NathanReb wants to merge 2 commits into
ocaml:masterfrom
NathanReb:fix-opam-config-subst-absolute-path

Conversation

@NathanReb
Copy link
Copy Markdown
Collaborator

Fixes #6925

This PR fixes opam config subst so that it treats absolute paths correctly.

What this PR does not do is change the current subst behaviour which is in my opinion a bit shady. opam config subst <path> will not rewrite <path> in place, substituting variables, as is described in the manual/command's --help section but instead expects to find a <path>.in file and will write the result of the substitution in <path>.

The fact this hasn't been reported seem to indicate it is probably unused but I thought that fixing the absolute paths handling to be necessary since I touched this particular part of the code in #6910.

NathanReb added 2 commits May 18, 2026 10:41
Signed-off-by: Nathan Rebours <nathan.rebours@ocamlpro.com>
Signed-off-by: Nathan Rebours <nathan.rebours@ocamlpro.com>
@NathanReb NathanReb force-pushed the fix-opam-config-subst-absolute-path branch from cb9cb8e to 8449b7b Compare May 18, 2026 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

opam config subst does not support absolute pathnames

1 participant