Skip to content

Escape binstub paths in both generation commands - #142

Open
OskarEichler wants to merge 1 commit into
capistrano:masterfrom
OskarEichler:codex/escape-binstub-paths
Open

Escape binstub paths in both generation commands#142
OskarEichler wants to merge 1 commit into
capistrano:masterfrom
OskarEichler:codex/escape-binstub-paths

Conversation

@OskarEichler

Copy link
Copy Markdown

Summary

Shell-escape String/Pathname binstub paths in both the legacy install option and standalone binstubs command.

Reproduction and verification

With bundle_binstubs set to /audit/bin with space, SSHKit renders a command whose path becomes multiple arguments. The same occurs in both command modes. Applying to_s.shellescape, as already done for bundle config values, preserves the path as one argument.

The combined installed-release candidate passes 44 focused command checks and 501 generated path/prefix cases. Five additional scenarios use real Capistrano 3.20.1, Rake and SSHKit 1.25.1 with an Abstract recording backend, including installation failure propagation. The backend records commands and performs no SSH or shell execution.

The repository contains no automated test suite or lint configuration. Its default rake task is a no-op and succeeds through rbenv; runtime syntax and package checks pass. Official/candidate packages retain 2.2.0, all 17 paths and metadata/dependencies; only lib/capistrano/tasks/bundler.cap changes. All Ruby verification uses rbenv Ruby 4.0.6. No tests were added or modified under the consuming repository's policy.

Compatibility and limitations

Ordinary paths are unchanged; whitespace and literal punctuation now reach Bundler as part of the intended path. Free-form bundle_flags and other command options are not changed. The patch does not execute remote commands or introduce a new dependency.

No deployment or production changes. Legacy Bundler command generation is checked, but old Ruby/Bundler installations and remote servers were not executed. The existing Bundler 4 default-change proposal #140 is not included.

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