Skip to content

Drop the exec word from rb msvc - #6

Merged
hsbt merged 2 commits into
masterfrom
claude/happy-engelbart-78d0a1
Jul 28, 2026
Merged

Drop the exec word from rb msvc#6
hsbt merged 2 commits into
masterfrom
claude/happy-engelbart-78d0a1

Conversation

@hsbt

@hsbt hsbt commented Jul 28, 2026

Copy link
Copy Markdown
Member

rb msvc exec gem install nokogiri becomes rb msvc gem install nokogiri and rb msvc list becomes rb msvc --list. A top-level rb exec was rejected earlier for reading as "run under the selected ruby", and dropping the word entirely is the next step. It reads as "under MSVC, run this", invents no vocabulary, and takes the shape xcrun clang ... uses.

rb msvc gem install nokogiri
rb msvc --vsver 2022 gem install nokogiri
rb msvc enable powershell | Invoke-Expression
rb msvc --list

Giving the bare-word space after msvc to the user's command leaves enable as the only reserved word, so any later operation has to be a flag rather than a word that would silently shadow a real executable. docs/msvc-enable.md records the rule and cites cargo, which enumerates with cargo --list for the same reason. There is no exec alias since nothing has shipped to migrate.

Verified against Build Tools 2017 through 2026. rb msvc --vsver 2019 cl runs cl 19.29, and all suites are green.

hsbt and others added 2 commits July 28, 2026 20:17
rb msvc exec gem install nokogiri becomes rb msvc gem install nokogiri, the shape xcrun uses, and rb msvc list becomes rb msvc --list. Handing the bare-word space after msvc to the user's command leaves enable as the only reserved word, so any later operation has to be a flag: a word would silently shadow a real executable on PATH.

Co-Authored-By: Claude Opus 5 <[email protected]>
The single entry parser is where the surface can silently go wrong, so the new cases cover passthrough of a bare command, enable still reaching enable with --vsver on either side, -- forcing the reserved word to be a command, --list rejecting a trailing command, and option recognition stopping at the first command token.

Co-Authored-By: Claude Opus 5 <[email protected]>
@hsbt
hsbt merged commit 84879fb into master Jul 28, 2026
3 checks passed
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