WSL2: Ensure the Windows Terminal is detected under WSL2 docker build. (#4915)

- by passing the WT_SESSION environment variable into the docker container  if it is set
This commit is contained in:
Michael Beck
2023-03-09 19:19:30 +01:00
committed by GitHub
parent b7b8eb7b72
commit 1223b22ffd

View File

@@ -460,6 +460,11 @@ function docker_cli_prepare_launch() {
fi
fi
# If set, pass down the Windows Terminal Session, so the existance of Windows Terminal can be detected later
if [[ -n "${WT_SESSION}" ]]; then
DOCKER_ARGS+=("--env" "WT_SESSION=${WT_SESSION}")
fi
# This will receive the mountpoint as $1 and the mountpoint vars in the environment.
function prepare_docker_args_for_mountpoint() {
local MOUNT_DIR="$1"