Resolve internal CLI calls with Windows-safe pattern #771
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.
To protect Windows from itself, use explicit
node path/to/cli.js [..args]
call style.Motivation and Context
The
require.resolve()
calls were removed in #759, not realizingyarn
was going to rain on our parade very shortly. This PR builds on #770, which provides some optimizations to therimraf
calls independent of the local resolution issue.#708 is fixed by this because we're not letting Windows Script Host get involved at all, instead calling the resolved CLI in the
node path/to/cli.js [..args]
pattern (which is implicitly what a shebang does, anyway).How Has This Been Tested?
Local testing, because yet again I am foiled by unstable test snapshots (
lerna publish --conventional-commits
almost all the way there, except for the timestamps in the changelog output and actual commit history, etc). Le sigh.Types of changes
Checklist: