Drop the exec word from rb msvc - #6
Merged
Merged
Conversation
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
rb msvc exec gem install nokogiribecomesrb msvc gem install nokogiriandrb msvc listbecomesrb msvc --list. A top-levelrb execwas 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 shapexcrun clang ...uses.Giving the bare-word space after
msvcto the user's command leavesenableas 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.mdrecords the rule and cites cargo, which enumerates withcargo --listfor the same reason. There is noexecalias since nothing has shipped to migrate.Verified against Build Tools 2017 through 2026.
rb msvc --vsver 2019 clruns cl 19.29, and all suites are green.