Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Harden the glob in cross-version test scripts (#77182)

Nemanja Glumac107df96fbd66
diff --git a/cross-version/dev.sh b/cross-version/dev.sh
index a8dae9d95c6..86fb15d7c4a 100755
--- a/cross-version/dev.sh
+++ b/cross-version/dev.sh
@@ -74,6 +74,8 @@ if [[ ! -d "$SPECS_DIR" ]]; then
closest=""
closest_dist=999
for dir in "$REPO_ROOT"/e2e/cross-version/[0-9]*/; do
+ # Skip the literal pattern when the glob matches no numbered folders
+ [[ -d "$dir" ]] || continue
v=$(basename "$dir")
(( v < MAJOR )) && continue
dist=$(( v - MAJOR ))
diff --git a/cross-version/test.sh b/cross-version/test.sh
index 41f82967a52..42de360ff87 100755
--- a/cross-version/test.sh
+++ b/cross-version/test.sh
@@ -89,6 +89,8 @@ run_e2e() {
if [[ ! -d "$specs_dir" ]]; then
local closest="" closest_dist=999
for dir in "$REPO_ROOT"/e2e/cross-version/[0-9]*/; do
+ # Skip the literal pattern when the glob matches no numbered folders
+ [[ -d "$dir" ]] || continue
local v=$(basename "$dir")
(( v < major )) && continue
local dist=$(( v - major ))