jingham added a comment.

If I'm following the logic correctly, if you run a target with inherit-env off, 
and then do:

  env VAR_IN_ENVIRONMENT=NOT_THE_ENVIRONMENTS_VALUE

then turn inherit-env on, we will preserve the value you set it to, not the 
environment value, because you pass in false for can_replace.  That seems right 
to me.  It would be good to test that case explicitly, however.

But if you have inherit-env on and then run the command above, and then turn 
inherit-env off, your changed value will just get deleted.  That seems 
unexpected.  I think you have to compare the values in the else branch and only 
delete the key if the value is the same as the environment value.  Does that 
sound right?

If so, then it would be good to test that as well...


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76105/new/

https://reviews.llvm.org/D76105



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to