Skip to content

Harden attach argument forwarding - #517

Merged
joelteply merged 1 commit into
canaryfrom
codex/protect-attach-startup-grace
May 5, 2026
Merged

joelteply merged 1 commit into
canaryfrom
codex/protect-attach-startup-grace

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Summary

  • harden attach transport argument forwarding when the original argv is empty
  • keep the attach startup-grace fix from Protect attach startup grace #516 compatible with older bash/set-u expansion semantics

Validation

  • bash -n lib/airc_bash/cmd_connect.sh airc test/integration.sh
  • git diff --check origin/canary..HEAD

Copilot AI review requested due to automatic review settings May 5, 2026 05:53
@joelteply
joelteply merged commit 677bce5 into canary May 5, 2026
8 checks passed
@joelteply
joelteply deleted the codex/protect-attach-startup-grace branch May 5, 2026 05:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens the --attach pathway in cmd_connect so the background transport spawn can safely forward the original argv even when the original invocation had no arguments, while remaining compatible with older bash + set -u parameter expansion behavior.

Changes:

  • Switch attach-mode argument forwarding to the ${arr[@]+"${arr[@]}"} idiom to avoid unset/empty expansion pitfalls.
  • Preserve existing attach startup behavior while making the argv passthrough more robust for zero-arg invocations.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants