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
This commit is contained in:
app
2025-08-30 22:45:23 +08:00
parent 01de33ccc1
commit c19d8bfe9d
2 changed files with 2 additions and 2 deletions

View File

@@ -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")

View File

@@ -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")