Updating version of vscode and adding feature to restart.
Some checks failed
Build and Push Docker Image ARM64 / docker (push) Failing after 1m27s

This commit is contained in:
2025-04-13 00:51:32 +00:00
parent 0c8c0d1068
commit 8d5deeeef0
3 changed files with 23 additions and 4 deletions

View File

@ -157,8 +157,15 @@ else
echo "File extensions.json not found"
fi
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}"
# 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, use restart
sudo su ${HOME_USER} -c "code tunnel restart"
else
sudo su ${HOME_USER} -c "code tunnel --accept-server-license-terms"
# No CLI directory or empty, use 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