Skip to content

Conversation

@barefootcoder
Copy link

Summary

  • project-install.sh silently exits after printing "Configuration:" without installing anything
  • Root cause: bash ((var++)) returns exit status 1 when var is 0 (post-increment returns the old value), and set -e treats this as a fatal error
  • Fixed all standalone ((var++)) expressions across project-install.sh, common-functions.sh, and sync-to-profile.sh by appending || true

Steps to reproduce

cd /path/to/any/project
/path/to/agent-os/scripts/project-install.sh

Output stops at "Configuration:" and no files are installed.

Test plan

  • Verified project-install.sh now completes successfully and installs all 5 commands
  • Verify sync-to-profile.sh works with the same fix pattern

🤖 Generated with Claude Code

When a bash arithmetic expression ((var++)) is evaluated and var is 0,
the post-increment returns the old value (0), which bash treats as a
failure exit status. Combined with set -e, this silently kills the
script. This caused project-install.sh to exit immediately after
printing "Configuration:" without performing any installation.

Fix by appending `|| true` to all standalone ((var++)) expressions
so the zero-return doesn't trigger set -e.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant