[Tests] install_nvm_from_git: fix malformed test command (missing space before ])

`[ "${head_ref}" != "${avoid_ref}"]` is missing the space before the closing bracket,
so the shell prints `[: missing ']'` and the avoid_ref assertion never actually runs
(it is inside an `if` condition, so the error was non-fatal and silently disabled the check)
This commit is contained in:
Jordan Harband
2026-06-03 14:53:48 -07:00
parent 16f6ddc3d5
commit 61c9ff7371

View File

@@ -61,7 +61,7 @@ test_install_data() {
fi
local head_ref="$(git for-each-ref --points-at HEAD --format='%(refname:short)' 'refs/tags/')"
if [ -n "${avoid_ref}" ] && [ "${head_ref}" != "${avoid_ref}"]; then
if [ -n "${avoid_ref}" ] && [ "${head_ref}" != "${avoid_ref}" ]; then
echo "${current_ref}" | grep -q "$avoid_ref" && die "install_nvm_from_git ${message} did clone with unwanted ref ${avoid_ref}"
fi