Skip to content

Commit

Permalink
Removed the (probably) unnecessary sleep statements since they crash …
Browse files Browse the repository at this point in the history
…the devcontainers/ci
  • Loading branch information
MBerkayHamurcu committed Dec 29, 2024
1 parent 1e00cf4 commit b984400
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 deletions.
17 changes: 3 additions & 14 deletions .devcontainer/scripts/installLTeX.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 1 addition & 3 deletions .devcontainer/scripts/startService.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit b984400

Please sign in to comment.