You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running update with the --dry-run flag, files are actually deleted during the cleanup phase, even though the script displays "DRY RUN - No files will be actually modified". The deleted files are not recreated, resulting in data loss.
How it happens:
The bug is in scripts/project-update.sh, but it can be triggered when running project-install.sh on an existing installation (which automatically calls the update script).
Reproduction Steps:
Install Agent OS in a project: ~/agent-os/scripts/project-install.sh
Later, run with dry-run: ~/agent-os/scripts/project-install.sh --dry-run
Script detects existing installation and runs update
Observe: Files are actually deleted despite dry-run flag
Check git status: Shows deleted files in agent-os/standards/, .claude/agents/, etc.
Expected Behavior:
Dry-run mode should preview changes without modifying any files.
Actual Behavior:
The perform_update_cleanup() function in scripts/project-update.sh has 7 rm -rf commands without DRY_RUN checks. The cleanup runs unconditionally, then the update phase respects dry-run mode and doesn't recreate files.
Files deleted:
agent-os/standards/
agent-os/commands/
.claude/agents/agent-os/
.claude/commands/agent-os/
.claude/skills/ (Agent OS skills)
agent-os/roles/ (legacy)
Impact:
Users lose data when trying to safely preview updates. Makes dry-run mode unreliable.
Fix:
I have a fix ready that wraps all deletion operations with dry-run checks in #245
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description:
When running update with the
--dry-runflag, files are actually deleted during the cleanup phase, even though the script displays "DRY RUN - No files will be actually modified". The deleted files are not recreated, resulting in data loss.How it happens:
The bug is in
scripts/project-update.sh, but it can be triggered when runningproject-install.shon an existing installation (which automatically calls the update script).Reproduction Steps:
~/agent-os/scripts/project-install.sh~/agent-os/scripts/project-install.sh --dry-rungit status: Shows deleted files in agent-os/standards/, .claude/agents/, etc.Expected Behavior:
Dry-run mode should preview changes without modifying any files.
Actual Behavior:
The
perform_update_cleanup()function inscripts/project-update.shhas 7rm -rfcommands withoutDRY_RUNchecks. The cleanup runs unconditionally, then the update phase respects dry-run mode and doesn't recreate files.Files deleted:
Impact:
Users lose data when trying to safely preview updates. Makes dry-run mode unreliable.
Fix:
I have a fix ready that wraps all deletion operations with dry-run checks in #245
Beta Was this translation helpful? Give feedback.
All reactions