diff --git a/src/state/opamEnv.ml b/src/state/opamEnv.ml index 2f9beb12460..0ae590b3d96 100644 --- a/src/state/opamEnv.ml +++ b/src/state/opamEnv.ml @@ -156,9 +156,9 @@ let split_var ~(sepfmt:sep_path_format) var value = in let sep = OpamTypesBase.char_of_separator separator in match format with - | Target_quoted | Host_quoted -> - List.map (fun s -> (s, s, sep)) (OpamStd.String.split value sep) | Target | Host -> + List.map (fun s -> (s, s, sep)) (OpamStd.String.split value sep) + | Target_quoted | Host_quoted -> let split_path_variable path = let length = String.length path in let rec f acc index current current_raw last normal = diff --git a/tests/reftests/env.win32.test b/tests/reftests/env.win32.test index 0b4f3216f0a..4903433f138 100644 --- a/tests/reftests/env.win32.test +++ b/tests/reftests/env.win32.test @@ -27,6 +27,7 @@ set "PATH=${BASEDIR}/OPAM/rewriting/bin;C:\Devel\bin1;C:\Devel\bin2;"C:\Devel\bi ### opam env | grep 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 ### : This sequence of updates is what presently happens with the compiler ###