nRF Connect for VS Code messes up environment variables

Hi,

I have an environment variable with newlines and that is messed up by the VS Code extension. It seems that the extension tries to parse and rewrite the whole environment for some unknown reason. I have the following variables defined among others.

BASH_FUNC_ml%%=() { module ml "$@"
}
BASH_FUNC_which%%=() { ( alias;
eval ${which_declare} ) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot $@
}

When I build inside VS Code i get the following in the terminal.


[301/301] Generating zephyr/merged.hex
/bin/sh: ml: line 1: syntax error: unexpected end of file
/bin/sh: error importing function definition for `ml'
/bin/sh: which: line 1: syntax error: unexpected end of file
/bin/sh: error importing function definition for `which'

nRF Connect SDK extension for VS Code, v2022.7.242.

Why does the extension rewrite my environment in the first place?

Thanks for reminding me to post this issue here.

Related