diff --git a/.devcontainer/scripts/installLTeX.bash b/.devcontainer/scripts/installLTeX.bash index 1bd0d34..56d1b8b 100644 --- a/.devcontainer/scripts/installLTeX.bash +++ b/.devcontainer/scripts/installLTeX.bash @@ -2,24 +2,13 @@ cd /workspaces/*/.devcontainer -MAX_WAIT_TIME=60 -WAIT_INTERVAL=10 -ELAPSED_TIME=$1 +/vscode/vscode-server/bin/linux-x64/*/bin/remote-cli/code --version -sleep $WAIT_INTERVAL - -# Wait for the VS Code CLI to get available -while ! /vscode/vscode-server/bin/linux-x64/*/bin/remote-cli/code --version &>/dev/null; do - if [[ ! $ELAPSED_TIME -lt $MAX_WAIT_TIME ]]; then +if [ "$?" -ne 0 ]; then bash scripts/log.bash installLTeX VSCODE_CLI_not_available exit 1 - fi - - ELAPSED_TIME=$((ELAPSED_TIME + WAIT_INTERVAL)) - - exec bash scripts/installLTeX.bash "$ELAPSED_TIME" -done +fi if /vscode/vscode-server/bin/linux-x64/*/bin/remote-cli/code --list-extensions | grep -q 'neo-ltex.ltex'; then echo -e "The VS Code LTeX extension is already installed.\n" diff --git a/.devcontainer/scripts/startService.bash b/.devcontainer/scripts/startService.bash index 47d2b72..de93625 100644 --- a/.devcontainer/scripts/startService.bash +++ b/.devcontainer/scripts/startService.bash @@ -34,6 +34,4 @@ rm /workspaces/*/.devcontainer/DevContainerIsPostCreate echo -e "Installing the VS Code LTeX extension (grammar & spell checker)...\n" -sleep 30 - -exec bash .devcontainer/scripts/installLTeX.bash 0 +exec bash .devcontainer/scripts/installLTeX.bash