diff --git a/nix/oci/tanzu/default.nix b/nix/oci/tanzu/default.nix index c613d5f3..594a8af6 100644 --- a/nix/oci/tanzu/default.nix +++ b/nix/oci/tanzu/default.nix @@ -274,8 +274,7 @@ in "TERM=xterm" "TZ=UTC" "WORKDIR=/workdir" - "VSCODE_CONTAINER_ENV=FALSE" - "VSCODE_REMOTE_ENV=FALSE" + "ENVIRONMENT_VSCODE=none" ]; WorkingDir = "/workdir"; WorkDir = "/workdir"; diff --git a/nix/oci/tanzu/root/etc/profile.d/tanzu.sh b/nix/oci/tanzu/root/etc/profile.d/tanzu.sh index b85806f9..14649103 100755 --- a/nix/oci/tanzu/root/etc/profile.d/tanzu.sh +++ b/nix/oci/tanzu/root/etc/profile.d/tanzu.sh @@ -49,7 +49,7 @@ if [[ -f "${HOME}/.config/tanzu/config.yaml" ]]; then fi # Make sure that the interactive parts are not run in a a VSCode remote env. -if [[ "${VSCODE_REMOTE_ENV:-FALSE}" == "TRUE" ]]; then +if [[ "${ENVIRONMENT_VSCODE^^}" == "REMOTE" ]]; then echo "$(date '+%Y/%m/%d %T'): INFO: VSCode remote environment detected, skipping interactive parts." | tee -a "/tmp/vscode-remote-env.log" diff --git a/nix/oci/tanzu/root/etc/skel/.bashrc b/nix/oci/tanzu/root/etc/skel/.bashrc index 416bc3c4..09d43651 100644 --- a/nix/oci/tanzu/root/etc/skel/.bashrc +++ b/nix/oci/tanzu/root/etc/skel/.bashrc @@ -115,7 +115,7 @@ if ! shopt -oq posix; then fi # Make sure that the interactive parts are not run in a a VSCode remote env. -if [[ ${VSCODE_REMOTE_ENV:-FALSE} == "TRUE" ]]; then +if [[ "${ENVIRONMENT_VSCODE^^}" == "REMOTE" ]]; then echo "$(date '+%Y/%m/%d %T'): INFO: VSCode remote environment detected, skipping interactive parts." | tee -a "/tmp/vscode-remote-env.log" diff --git a/nix/oci/tanzu/root/usr/local/bin/entrypoint.sh b/nix/oci/tanzu/root/usr/local/bin/entrypoint.sh index 0e0f8890..0d060529 100755 --- a/nix/oci/tanzu/root/usr/local/bin/entrypoint.sh +++ b/nix/oci/tanzu/root/usr/local/bin/entrypoint.sh @@ -8,7 +8,7 @@ fi /usr/bin/env bash --login -i || true # Make sure that the interactive parts are not run in a a VSCode remote env. -if [[ "${VSCODE_REMOTE_ENV:-FALSE}" == "TRUE" ]]; then +if [[ "${ENVIRONMENT_VSCODE^^}" == "REMOTE" ]]; then echo "$(date '+%Y/%m/%d %T'): INFO: VSCode remote environment detected, skipping interactive parts." | tee -a "/tmp/vscode-remote-env.log"