From 101476df872d58e2082a74daa659ee3582baa763 Mon Sep 17 00:00:00 2001 From: dullbananas Date: Thu, 22 Aug 2024 08:33:00 -0700 Subject: [PATCH] Make scripts work in path that contains spaces (#4986) --- scripts/db_perf.sh | 2 +- scripts/dump_schema.sh | 2 +- scripts/lint.sh | 2 +- scripts/release.sh | 2 +- scripts/sql_format_check.sh | 2 +- scripts/test-with-coverage.sh | 2 +- scripts/test.sh | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/db_perf.sh b/scripts/db_perf.sh index ef4b2751a..1d53e0d37 100755 --- a/scripts/db_perf.sh +++ b/scripts/db_perf.sh @@ -6,7 +6,7 @@ set -e CWD="$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)" -cd $CWD/../ +cd "$CWD/../" source scripts/start_dev_db.sh diff --git a/scripts/dump_schema.sh b/scripts/dump_schema.sh index f783be26b..c32cf20e5 100755 --- a/scripts/dump_schema.sh +++ b/scripts/dump_schema.sh @@ -5,7 +5,7 @@ set -e CWD="$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)" -cd $CWD/../ +cd "$CWD/../" source scripts/start_dev_db.sh diff --git a/scripts/lint.sh b/scripts/lint.sh index 20d89acb4..c9f0f5dd7 100755 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -3,7 +3,7 @@ set -e CWD="$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)" -cd $CWD/../ +cd "$CWD/../" # Format rust files cargo +nightly fmt diff --git a/scripts/release.sh b/scripts/release.sh index 1cf7b168a..79209f3b4 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -8,7 +8,7 @@ third_semver=$(echo $new_tag | cut -d "." -f 3) # Goto the upper route CWD="$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)" -cd $CWD/../ +cd "$CWD/../" # The docker installs should only update for non release-candidates # IE, when the third semver is a number, not '2-rc' diff --git a/scripts/sql_format_check.sh b/scripts/sql_format_check.sh index fabc3b3ed..3a2710b84 100755 --- a/scripts/sql_format_check.sh +++ b/scripts/sql_format_check.sh @@ -5,7 +5,7 @@ set -e CWD="$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)" -cd $CWD/../ +cd "$CWD/../" # Copy the files to a temp dir TMP_DIR=$(mktemp -d) diff --git a/scripts/test-with-coverage.sh b/scripts/test-with-coverage.sh index e4dfcddf8..7a4905b8e 100755 --- a/scripts/test-with-coverage.sh +++ b/scripts/test-with-coverage.sh @@ -3,7 +3,7 @@ set -e CWD="$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)" -cd $CWD/../ +cd "$CWD/../" PACKAGE="$1" echo "$PACKAGE" diff --git a/scripts/test.sh b/scripts/test.sh index 04cc94f9d..e08148db0 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -3,7 +3,7 @@ set -e CWD="$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)" -cd $CWD/../ +cd "$CWD/../" PACKAGE="$1" TEST="$2"