Skip to content

Commit

Permalink
Merge pull request ocaml#5972 from dra27/quoting-pkg-config
Browse files Browse the repository at this point in the history
Change default rule for `PKG_CONFIG_PATH` and `MANPATH` to `target`
  • Loading branch information
kit-ty-kate authored Jun 6, 2024
2 parents b749b7a + de71202 commit 3aa169e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions master_changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ users)
* [BUG] Rework the logic of := and =: so that an empty entry is correctly preserved on multiple updates [#5935 @dra27 - fix #5926]
* [BUG] Fix incorrect reverting of `=+` and `=:` [#5935 @dra27 - fix #5926]
* For the `Cygwin` internal operator, don't allow `make.exe` to become shadowed [#5996 @dra27]
* [BUG] Fix incorrect quoting rule for `PKG_CONFIG_PATH` [#5972 @dra27 - partial fix for #5923]

## Opamfile

Expand Down
2 changes: 1 addition & 1 deletion src/state/opamEnv.ml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ let default_sep_fmt_str var =
| "PATH" when Sys.win32 ->
SSemiColon, Target_quoted
| "PKG_CONFIG_PATH" | "MANPATH" ->
SColon, Target_quoted
SColon, Host
| _ -> default_separator, default_format

let default_sep_fmt var = default_sep_fmt_str (OpamStd.Env.Name.to_string var)
Expand Down
4 changes: 2 additions & 2 deletions tests/reftests/env.win32.test
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ Done.
### : already contains a directory which needs escaping (e.g. building with
### : MSVC)
### opam env --shell=cmd | grep "PATH" | 'XXX:.*' -> '' | 'set "P' -> 'set P'
set "MANPATH=:"${BASEDIR}/OPAM/rewriting/man""
set MANPATH=:${BASEDIR}/OPAM/rewriting/man
set PATH=${BASEDIR}/OPAM/rewriting/bin;C:\Devel\bin1;C:\Devel\bin2;"C:\Devel\bin3;";C:\Devel\bin4;ZZZ:\;
### opam exec -- opam env --shell=cmd --revert | grep 'ZZZ:' | 'ZZZ:\\.*' -> 'ZZZ:\' | 'set "P' -> 'set P'
### : Test for #5838
### opam env | grep MANPATH
MANPATH=':"${BASEDIR}/OPAM/rewriting/man"'; export MANPATH;
MANPATH=':${BASEDIR}/OPAM/rewriting/man'; export MANPATH;
### opam exec -- opam env --revert | grep MANPATH
MANPATH=''; export MANPATH;
### : Tests forward and backslash rewriting on revert
Expand Down

0 comments on commit 3aa169e

Please sign in to comment.