Skip to content

Fix printf dash-arg bug in setup.sh and agent-wizard.sh#28

Closed
acartine wants to merge 1 commit intomainfrom
fix/foolery-9df0-printf-arrow
Closed

Fix printf dash-arg bug in setup.sh and agent-wizard.sh#28
acartine wants to merge 1 commit intomainfrom
fix/foolery-9df0-printf-arrow

Conversation

@acartine
Copy link
Copy Markdown
Owner

Summary

  • Fix printf '->' bash bug in scripts/setup.sh and scripts/agent-wizard.shprintf interprets the leading - as an option flag, producing printf: ->: invalid option
  • The safe form printf '%s' '->' is already used in scripts/install.sh; this applies the same fix to the remaining two scripts
  • Add regression test scanning all scripts/*.sh for bare printf '-…' patterns

Test plan

  • New scripts-printf-safety.test.ts regression test passes
  • All 2260 tests pass
  • Lint, typecheck, and build all clean

🤖 Generated with Claude Code

Bare `printf '->'` causes bash to interpret the leading dash as an
option flag, producing "invalid option" errors. Use `printf '%s' '->'`
instead, matching the fix already applied in install.sh.

Add a regression test that scans all scripts/*.sh files for bare
printf calls with dash-prefixed arguments.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@acartine
Copy link
Copy Markdown
Owner Author

acartine commented Apr 1, 2026

Closing — this fix was already merged to main via commit 7108420.

@acartine acartine closed this Apr 1, 2026
@acartine acartine deleted the fix/foolery-9df0-printf-arrow branch April 1, 2026 12:34
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