Skip to content

Commit 87e1434

Browse files
fix: resolve installation symlinks, support skip setup, and add release sync CI/CD
- Implements portable symlink path resolution in bin/arrowcode, fixing 'index.ts not found' on Linux and macOS. - Updates src/setup/wizard.ts and src/index.ts to ask users if they want to configure API keys now, adding option '0' to Cancel/Set up later, and exiting gracefully with 0. - Adds .github/workflows/release.yml to automate version bumping and synchronization across all files on release publishing or manual dispatch. - Fixes BASH_SOURCE[0] unbound variable bug in install.sh, allowing the script to be piped directly from curl to bash without errors.
1 parent 9940c9b commit 87e1434

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

install.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,13 @@ if ! command -v bun >/dev/null 2>&1; then
8181
fi
8282
ok "Bun $(bun --version)"
8383

84-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
84+
SCRIPT_DIR=""
85+
if [ -n "${BASH_SOURCE[0]:-}" ]; then
86+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
87+
fi
8588

8689
# Prefer in-place install when running from a full checkout
87-
if [[ -z "${ARROWCODE_DIR:-}" && -f "$SCRIPT_DIR/package.json" && -f "$SCRIPT_DIR/src/index.ts" ]]; then
90+
if [[ -n "$SCRIPT_DIR" && -z "${ARROWCODE_DIR:-}" && -f "$SCRIPT_DIR/package.json" && -f "$SCRIPT_DIR/src/index.ts" ]]; then
8891
INSTALL_DIR="$SCRIPT_DIR"
8992
log "Detected local repo — installing in-place: $INSTALL_DIR"
9093
fi
@@ -103,7 +106,7 @@ else
103106
mkdir -p "$(dirname "$INSTALL_DIR")"
104107
if command -v git >/dev/null 2>&1 && git clone --depth 1 --branch "$BRANCH" "$REPO_URL" "$INSTALL_DIR" 2>/dev/null; then
105108
ok "Cloned repository"
106-
elif [[ -f "$SCRIPT_DIR/package.json" ]]; then
109+
elif [[ -n "$SCRIPT_DIR" && -f "$SCRIPT_DIR/package.json" ]]; then
107110
log "Clone unavailable — copying local repo from $SCRIPT_DIR"
108111
mkdir -p "$INSTALL_DIR"
109112
if command -v rsync >/dev/null 2>&1; then

0 commit comments

Comments
 (0)