diff --git a/hack/run-e2e.sh b/hack/run-e2e.sh index d86978afc..e9c7923ee 100755 --- a/hack/run-e2e.sh +++ b/hack/run-e2e.sh @@ -103,5 +103,5 @@ if [[ -n "${KUBECTL_CONTEXT:-}" ]]; then extra_e2e_args+=("--kube-context" "${KUBECTL_CONTEXT}") fi -exec go test -v "$target_path" "${go_test_args[@]}" -args --e2e "${extra_e2e_args[@]}" "${e2e_args[@]}" +exec go test -v "$target_path" ${go_test_args[@]+"${go_test_args[@]}"} -args --e2e ${extra_e2e_args[@]+"${extra_e2e_args[@]}"} ${e2e_args[@]+"${e2e_args[@]}"} diff --git a/hack/verify/python-licenses.sh b/hack/verify/python-licenses.sh index 0aace2251..4b991f8f1 100755 --- a/hack/verify/python-licenses.sh +++ b/hack/verify/python-licenses.sh @@ -31,7 +31,10 @@ cd "${ROOT}" # that contains requirements.txt; its venv lives at /venv. Discovered # dynamically from tracked/untracked (but not ignored) requirements.txt files, # excluding vendored trees and the LICENSES/ directory. -mapfile -t PROJECTS < <( +PROJECTS=() +while IFS= read -r line || [[ -n "${line}" ]]; do + [[ -n "${line}" ]] && PROJECTS+=("${line}") +done < <( git ls-files \ -cmo \ --exclude-standard \ @@ -94,7 +97,7 @@ check_project() { } fail=0 -for proj in "${PROJECTS[@]}"; do +for proj in ${PROJECTS[@]+"${PROJECTS[@]}"}; do if ! check_project "${proj}"; then echo "ERROR: ${proj} contains disallowed Python license(s)" >&2 fail=1