From c19d8bfe9d4b329d6073f6a2a0c3e1a3be8d6827 Mon Sep 17 00:00:00 2001 From: app Date: Sat, 30 Aug 2025 22:45:23 +0800 Subject: [PATCH] fix: cross-platform compatibility for sf-deploy and sf-dry-run scripts - Fixed bash syntax error on Linux: 1 -> 0 - The problematic syntax worked on macOS but failed on Linux with 'bad substitution' error - Now compatible with both Linux and macOS bash versions - Tested on Ubuntu Linux with bash 5.2.21 --- sf-deploy | 2 +- sf-dry-run | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sf-deploy b/sf-deploy index 4b2d654..697217f 100755 --- a/sf-deploy +++ b/sf-deploy @@ -127,7 +127,7 @@ done [[ -n "$ORG" ]] && CMD+=(--target-org "$ORG") # tests -if [[ ${#TESTS_ARR[@]:-0} -gt 0 ]]; then +if [[ ${#TESTS_ARR[@]} -gt 0 ]]; then CMD+=(--test-level RunSpecifiedTests) for T in "${TESTS_ARR[@]}"; do [[ -n "$T" ]] && CMD+=(--tests "$T") diff --git a/sf-dry-run b/sf-dry-run index 4e295f7..eb9a3fb 100755 --- a/sf-dry-run +++ b/sf-dry-run @@ -127,7 +127,7 @@ done [[ -n "$ORG" ]] && CMD+=(--target-org "$ORG") # tests -if [[ ${#TESTS_ARR[@]:-0} -gt 0 ]]; then +if [[ ${#TESTS_ARR[@]} -gt 0 ]]; then CMD+=(--test-level RunSpecifiedTests) for T in "${TESTS_ARR[@]}"; do [[ -n "$T" ]] && CMD+=(--tests "$T")