fix: correct SOURCE_KIRO path in Kiro installer (#1025)

The script lives inside .kiro/, so SCRIPT_DIR already resolves to the .kiro directory. Appending /.kiro again produced an invalid path (.kiro/.kiro) causing the installer to find no source files to copy.
This commit is contained in:
Phạm Phú Ngọc Trai 2026-04-01 04:06:11 +07:00 committed by GitHub
parent a1cebd29f7
commit a41a07363f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -14,9 +14,13 @@ set -euo pipefail
# When globs match nothing, expand to empty list instead of the literal pattern
shopt -s nullglob
# Resolve the directory where this script lives (the repo root)
# Resolve the directory where this script lives
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
SOURCE_KIRO="$SCRIPT_DIR/.kiro"
# The script lives inside .kiro/, so SCRIPT_DIR *is* the source.
# If invoked from the repo root (e.g., .kiro/install.sh), SCRIPT_DIR already
# points to the .kiro directory — no need to append /.kiro again.
SOURCE_KIRO="$SCRIPT_DIR"
# Target directory: argument or current working directory
TARGET="${1:-.}"