From 07f0abf531a42666a142bb37e4bbc9a61b8a53ab Mon Sep 17 00:00:00 2001 From: David Allsopp Date: Wed, 14 Feb 2024 15:52:26 +0000 Subject: [PATCH] Fix error from #5356 Logical statement became accidentally inverted. --- master_changes.md | 1 + src/state/opamEnv.ml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/master_changes.md b/master_changes.md index 451b7ad90af..81ae27993dd 100644 --- a/master_changes.md +++ b/master_changes.md @@ -60,6 +60,7 @@ users) ## Env * Fix shell detection on Windows when opam is called via Cygwin's /usr/bin/env even though cmd/powershell is used [#5797 @kit-ty-kate] * Fix incorrect deduplication of environment variables on update. Effect was that FOO += "" would occlude the value of FOO in the environment [#5837 @dra27] + * Fix regression from #5356 on the detection of out-of-date environment variables. As part of a refactoring, a filter predicate got inverted [#5837 @dra27] ## Opamfile diff --git a/src/state/opamEnv.ml b/src/state/opamEnv.ml index 01e31b6fdd1..58f3dccb85c 100644 --- a/src/state/opamEnv.ml +++ b/src/state/opamEnv.ml @@ -625,7 +625,7 @@ let is_up_to_date_raw ?(skip=OpamStateConfig.(!r.no_env_notice)) updates = if reverse_env_update ~sepfmt var op arg (split_var ~sepfmt var v) = None then upd::notutd else List.filter (fun upd -> - OpamStd.Env.Name.equal_string var upd.envu_var) notutd) + not (OpamStd.Env.Name.equal_string var upd.envu_var)) notutd) [] updates in