Skip to content

Fix setup wrapper quoting for multi-word args#97

Closed
ebbsanchez wants to merge 1 commit into
mitchellh:mainfrom
ebbsanchez:fix-setup-wrapper-nu-quoting
Closed

Fix setup wrapper quoting for multi-word args#97
ebbsanchez wants to merge 1 commit into
mitchellh:mainfrom
ebbsanchez:fix-setup-wrapper-nu-quoting

Conversation

@ebbsanchez

Copy link
Copy Markdown

Fixes #94.

The setup-vouch wrapper was using Bash printf %q to build a Nushell command string. That escaping is shell-specific, so multi-word values such as custom commit messages or denounce reasons can be split or misparsed before reaching the Nushell command.

This changes the wrapper to quote arguments as Nushell double-quoted literals only when needed, while leaving command names and flags bare. It also escapes the resolved VOUCH_LIB_DIR path before embedding it in the use statement.

Verification:

  • bash -n action/setup-vouch/vouch
  • local wrapper smoke test with --reason "AI slop with spaces" --write, confirming the full reason was written as one value
  • no-argument wrapper smoke test still prints usage
  • nu tests/run.nu --fast
  • git diff --check

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Hi @ebbsanchez, thanks for your interest in contributing!

This project requires that pull request authors are vouched, and you are not in the list of vouched users.

This PR will be closed automatically. See https://github.com/mitchellh/vouch/blob/main/CONTRIBUTING.md for more details.

@github-actions github-actions Bot closed this Jul 3, 2026
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.

vouch wrapper uses printf %q and cannot pass multi-word arguments to nushell

2 participants