fix(Makefile): defensively validate scoop output path #1255
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.
scoop prefix package
on Git Bash returns 0 and writes error to stdout even if scoop does not find thepackage
. (ScoopInstaller/Scoop#6228)Both #1252 and this change will work if future scoop returns 1 for unknown
package
#1252 will fail when the followings happen:
package
ANDgrep -v 'Could not find app path for'
fails by2.1. scoop changes error message of
scoop prefix package
, OR2.2.
scoop prefix neovim
returns a path that containsCould not find app path for
(very rare)The following change enables defensive path validation against the output. Works on either forward slash or backslash as path separator.