Merge pull request #206994 from microsoft/tyriar/205133

Run SI env changes even if it gets disabled
This commit is contained in:
Daniel Imms 2024-03-06 10:47:22 -08:00 committed by GitHub
commit 9b44bc28ca
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -32,12 +32,6 @@ if [[ "$VSCODE_INJECTION" == "1" ]]; then
fi
fi
# Shell integration was disabled by the shell, exit without warning assuming either the shell has
# explicitly disabled shell integration as it's incompatible or it implements the protocol.
if [ -z "$VSCODE_SHELL_INTEGRATION" ]; then
builtin return
fi
# Apply EnvironmentVariableCollections if needed
if [ -n "${VSCODE_ENV_REPLACE:-}" ]; then
IFS=':' read -rA ADDR <<< "$VSCODE_ENV_REPLACE"
@ -64,6 +58,12 @@ if [ -n "${VSCODE_ENV_APPEND:-}" ]; then
unset VSCODE_ENV_APPEND
fi
# Shell integration was disabled by the shell, exit without warning assuming either the shell has
# explicitly disabled shell integration as it's incompatible or it implements the protocol.
if [ -z "$VSCODE_SHELL_INTEGRATION" ]; then
builtin return
fi
# The property (P) and command (E) codes embed values which require escaping.
# Backslashes are doubled. Non-alphanumeric characters are converted to escaped hex.
__vsc_escape_value() {