summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJesse Vincent <jesse@fsck.com>2025-10-11 12:07:08 -0700
committerJesse Vincent <jesse@fsck.com>2025-10-11 12:07:08 -0700
commitd5e2fe78760792641d7c00abe95485c2e9428652 (patch)
tree2bf32387ff06f442cd69006db2fd11e7b8df76d3 /lib
parentd1f42e54620897df4098b8ed98333e5fd2f57676 (diff)
Make skills auto-update verbose for debugging
Diffstat (limited to 'lib')
-rwxr-xr-xlib/initialize-skills.sh15
1 files changed, 11 insertions, 4 deletions
diff --git a/lib/initialize-skills.sh b/lib/initialize-skills.sh
index 4d8ee89..b3f99e2 100755
--- a/lib/initialize-skills.sh
+++ b/lib/initialize-skills.sh
@@ -8,7 +8,7 @@ SKILLS_REPO="https://github.com/obra/superpowers-skills.git"
if [ -d "$SKILLS_DIR/.git" ]; then
cd "$SKILLS_DIR"
- # Fetch upstream
+ # Fetch upstream (silently)
git fetch upstream 2>/dev/null || git fetch origin 2>/dev/null || true
# Check if we can fast-forward
@@ -16,14 +16,21 @@ if [ -d "$SKILLS_DIR/.git" ]; then
REMOTE=$(git rev-parse @{u} 2>/dev/null || echo "")
BASE=$(git merge-base @ @{u} 2>/dev/null || echo "")
+ # Try to fast-forward merge first
if [ -n "$LOCAL" ] && [ -n "$REMOTE" ] && [ "$LOCAL" != "$REMOTE" ]; then
# Check if we can fast-forward (local is ancestor of remote)
if [ "$LOCAL" = "$BASE" ]; then
# Fast-forward merge is possible
- git merge --ff-only @{u} 2>/dev/null && echo "✓ Skills updated to latest version" || true
+ echo "Updating skills to latest version..."
+ if git merge --ff-only @{u} 2>&1; then
+ echo "✓ Skills updated successfully"
+ echo "SKILLS_UPDATED=true"
+ else
+ echo "Failed to update skills"
+ fi
else
- # Can't fast-forward (diverged or local is ahead)
- echo "⚠️ New skills available from upstream. Ask me to use the pulling-updates-from-skills-repository skill."
+ # Can't fast-forward - will be reported at the end
+ echo "SKILLS_BEHIND=true"
fi
fi