From 01f04cf9930d73881d6a4934d437c2ccec508b55 Mon Sep 17 00:00:00 2001 From: TungPham-TomTom <143825701+TungPham-TomTom@users.noreply.github.com> Date: Thu, 6 Jun 2024 11:29:39 +0200 Subject: [PATCH] Make scripts SC2086 compliant (#102) Co-authored-by: Pieter Noordhuis --- setup_release.sh | 4 ++-- setup_snapshot.sh | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/setup_release.sh b/setup_release.sh index 6a2b512..c1a38cd 100644 --- a/setup_release.sh +++ b/setup_release.sh @@ -9,7 +9,7 @@ fi # Pull latest version from VERSION file if not set. if [ -z "${VERSION:-}" ]; then - VERSION=$(cat $(dirname $0)/VERSION) + VERSION=$(cat $(dirname "$0")/VERSION) fi FILE="databricks_cli_$VERSION" @@ -52,4 +52,4 @@ unzip -q "${FILE}.zip" -d .bin # Add databricks to path. dir=$PWD/.bin chmod +x "${dir}/databricks" -echo "$dir" >> $GITHUB_PATH +echo "$dir" >> "$GITHUB_PATH" diff --git a/setup_snapshot.sh b/setup_snapshot.sh index f427460..78e10f6 100755 --- a/setup_snapshot.sh +++ b/setup_snapshot.sh @@ -71,7 +71,7 @@ macOS) ;; esac -gh run download $last_successful_run_id -n $artifact -D .bin +gh run download "$last_successful_run_id" -n "$artifact" -D .bin dir="$PWD/.bin/$(cli_snapshot_directory)" @@ -82,11 +82,11 @@ fi if [ "$RUNNER_OS" == "Windows" ]; then ( - cd $dir + cd "$dir" mv ./databricks.exe ./databricks ) fi # Add databricks to path. -chmod +x $dir/databricks -echo "$dir" >> $GITHUB_PATH +chmod +x "$dir/databricks" +echo "$dir" >> "$GITHUB_PATH"