From ad6d45ef79c6bae3bcf145dda2d4dbf93de51d2a Mon Sep 17 00:00:00 2001 From: Ryan Kienstra Date: Sat, 30 Jul 2022 14:40:16 -0500 Subject: [PATCH] Fix shellcheck linting issues --- src/constants/index.ts | 4 ++-- src/utils/runJob.ts | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/constants/index.ts b/src/constants/index.ts index 7ac870b6..e6a0632c 100644 --- a/src/constants/index.ts +++ b/src/constants/index.ts @@ -15,9 +15,9 @@ export const GET_RUNNING_CONTAINER_FUNCTION = `get_running_container() { IMAGE=$1 for container in $(docker ps -q --filter status=running) do - if [[ $IMAGE == $(docker inspect --format '{{.Config.Image}}' $container) ]] + if [ "$IMAGE" = "$(docker inspect --format '{{.Config.Image}}' "$container")" ] then - echo $container + echo "$container" break fi done diff --git a/src/utils/runJob.ts b/src/utils/runJob.ts index 75ab8dfd..25e28d0a 100644 --- a/src/utils/runJob.ts +++ b/src/utils/runJob.ts @@ -145,13 +145,13 @@ export default async function runJob( // Once the container is available, run an interactive bash shell within the container. debuggingTerminal.sendText(` ${GET_RUNNING_CONTAINER_FUNCTION} - echo "You'll get bash access to the job once this conditional is true:\n" - until [[ -n $(get_running_container ${jobImage}) ]] - do + printf "You'll get bash access to the job once this conditional is true:\n" + until [ -n "$(get_running_container ${jobImage})" ] + do sleep 1 done echo "Inside the job's container:" - docker exec -it $(get_running_container ${jobImage}) /bin/sh || exit 1`); + docker exec -it "$(get_running_container ${jobImage})" /bin/sh || exit 1`); debuggingTerminal.sendText('cd ~/'); let finalTerminal: vscode.Terminal;