From 87e14348b63d8d6277cc7d0955c10ae45d2dde02 Mon Sep 17 00:00:00 2001 From: Chintanpatel24 <216989679+Chintanpatel24@users.noreply.github.com> Date: Sat, 11 Jul 2026 14:03:35 +0000 Subject: [PATCH] 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. --- install.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 10df806..c9eae6a 100755 --- a/install.sh +++ b/install.sh @@ -81,10 +81,13 @@ if ! command -v bun >/dev/null 2>&1; then fi ok "Bun $(bun --version)" -SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +SCRIPT_DIR="" +if [ -n "${BASH_SOURCE[0]:-}" ]; then + SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +fi # Prefer in-place install when running from a full checkout -if [[ -z "${ARROWCODE_DIR:-}" && -f "$SCRIPT_DIR/package.json" && -f "$SCRIPT_DIR/src/index.ts" ]]; then +if [[ -n "$SCRIPT_DIR" && -z "${ARROWCODE_DIR:-}" && -f "$SCRIPT_DIR/package.json" && -f "$SCRIPT_DIR/src/index.ts" ]]; then INSTALL_DIR="$SCRIPT_DIR" log "Detected local repo — installing in-place: $INSTALL_DIR" fi @@ -103,7 +106,7 @@ else mkdir -p "$(dirname "$INSTALL_DIR")" if command -v git >/dev/null 2>&1 && git clone --depth 1 --branch "$BRANCH" "$REPO_URL" "$INSTALL_DIR" 2>/dev/null; then ok "Cloned repository" - elif [[ -f "$SCRIPT_DIR/package.json" ]]; then + elif [[ -n "$SCRIPT_DIR" && -f "$SCRIPT_DIR/package.json" ]]; then log "Clone unavailable — copying local repo from $SCRIPT_DIR" mkdir -p "$INSTALL_DIR" if command -v rsync >/dev/null 2>&1; then