From d84caeb8cf86c5b713dab0cad900e2bf0b4541f0 Mon Sep 17 00:00:00 2001 From: Alejandro Lembke Barrientos Date: Sun, 13 Apr 2025 03:57:47 +0000 Subject: [PATCH] Trying to fix issue when restart. --- entrypoint.sh | 19 ++----------------- version.txt | 2 +- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 36ebf03..8dc3c40 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -159,25 +159,10 @@ fi # Check if CLI directory exists and has content if [ -d "/home/${HOME_USER}/.vscode/cli" ] && [ "$(ls -A /home/${HOME_USER}/.vscode/cli 2>/dev/null)" ]; then - # CLI directory exists and has content, ensure proper permissions first - sudo chmod -R a+rwX /home/${HOME_USER}/.vscode/cli - - # Wait briefly to ensure services are up - sleep 2 - - echo "Restarting VS Code tunnel..." - # Try to restart, but fall back to normal startup if it fails - if ! sudo su ${HOME_USER} -c "code tunnel restart"; then - echo "Tunnel restart failed, trying normal startup..." - if [[ -v VSCODE_TUNNEL_NAME && -n "${VSCODE_TUNNEL_NAME}" ]]; then - sudo su ${HOME_USER} -c "code tunnel --accept-server-license-terms --name ${VSCODE_TUNNEL_NAME}" - else - sudo su ${HOME_USER} -c "code tunnel --accept-server-license-terms" - fi - fi + # CLI directory exists and has content, use restart + sudo su ${HOME_USER} -c "code tunnel restart --cli-data-dir /home/${HOME_USER}/.vscode/cli" else # No CLI directory or empty, use normal startup - echo "Starting new VS Code tunnel session..." if [[ -v VSCODE_TUNNEL_NAME && -n "${VSCODE_TUNNEL_NAME}" ]]; then sudo su ${HOME_USER} -c "code tunnel --accept-server-license-terms --name ${VSCODE_TUNNEL_NAME}" else diff --git a/version.txt b/version.txt index e4604e3..be94e6f 100755 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -3.2.1 +3.2.2