Skip to content

Commit a79ffd4

Browse files
committed
fix(installer): make source fallback compatible with macOS bash 3.2
1 parent bbb3704 commit a79ffd4

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

scripts/install.sh

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -127,16 +127,11 @@ install_from_source() {
127127
exit 1
128128
fi
129129

130-
local source_ref=()
131-
if [ -n "${VERSION:-}" ] && [ "${VERSION}" != "latest" ]; then
132-
source_ref=(--tag "${VERSION}")
133-
fi
134-
135130
local git_url="https://github.com/${REPO}.git"
136131
local cargo_bin="${CARGO_HOME:-$HOME/.cargo}/bin"
137132
local source_ref_text=""
138-
if [ "${#source_ref[@]}" -gt 0 ]; then
139-
source_ref_text="${source_ref[*]} "
133+
if [ -n "${VERSION:-}" ] && [ "${VERSION}" != "latest" ]; then
134+
source_ref_text="--tag ${VERSION} "
140135
fi
141136

142137
if [ "$DRY_RUN" = true ]; then
@@ -145,7 +140,11 @@ install_from_source() {
145140
return
146141
fi
147142

148-
cargo install --git "${git_url}" "${source_ref[@]}" --locked --force agentic-codebase
143+
if [ -n "${VERSION:-}" ] && [ "${VERSION}" != "latest" ]; then
144+
cargo install --git "${git_url}" --tag "${VERSION}" --locked --force agentic-codebase
145+
else
146+
cargo install --git "${git_url}" --locked --force agentic-codebase
147+
fi
149148

150149
mkdir -p "${INSTALL_DIR}"
151150
cp "${cargo_bin}/acb" "${INSTALL_DIR}/acb"

0 commit comments

Comments
 (0)