feat(core): Improve argument concatenation in Invoke-ExternalCommand#5065
Merged
niheaven merged 3 commits intoScoopInstaller:developfrom Jul 25, 2022
Merged
Conversation
2269a55 to
63f72e7
Compare
niheaven
reviewed
Jul 25, 2022
Co-authored-by: Hsiao-nan Cheung <niheaven@gmail.com>
niheaven
approved these changes
Jul 25, 2022
Member
niheaven
left a comment
There was a problem hiding this comment.
LGTM, but may need more tests in develop
issaclin32
added a commit
to ScoopInstaller/Extras
that referenced
this pull request
Aug 11, 2022
related: #9026 related: ScoopInstaller/Scoop#5065
issaclin32
added a commit
to ScoopInstaller/Extras
that referenced
this pull request
Aug 11, 2022
related: ScoopInstaller/Scoop#5065 related: #9026
issaclin32
added a commit
to ScoopInstaller/Extras
that referenced
this pull request
Aug 11, 2022
related: #9026 related: ScoopInstaller/Scoop#5065
issaclin32
added a commit
to ScoopInstaller/Extras
that referenced
this pull request
Aug 11, 2022
related: #9026 related: ScoopInstaller/Scoop#5065
issaclin32
added a commit
to ScoopInstaller/Extras
that referenced
this pull request
Aug 11, 2022
escape char `\" is not needed anymore related: #9026 related: ScoopInstaller/Scoop#5065
Member
|
And thank @issaclin32 for the fixes of incompatibility. 😭 |
issaclin32
added a commit
to ScoopInstaller/Extras
that referenced
this pull request
Aug 11, 2022
related: #9026 related: ScoopInstaller/Scoop#5065
issaclin32
added a commit
to ScoopInstaller/Extras
that referenced
this pull request
Aug 11, 2022
related: #9026 related: ScoopInstaller/Scoop#5065
issaclin32
added a commit
to ScoopInstaller/Main
that referenced
this pull request
Aug 11, 2022
* crc changed their file structure, need to modify accordingly * escape char `\" is not needed anymore * related: ScoopInstaller/Extras#9026 * related: ScoopInstaller/Scoop#5065
issaclin32
added a commit
to ScoopInstaller/Main
that referenced
this pull request
Aug 11, 2022
issaclin32
added a commit
to ScoopInstaller/Main
that referenced
this pull request
Aug 11, 2022
related: ScoopInstaller/Scoop#5065 related: ScoopInstaller/Extras#9026
issaclin32
added a commit
to ScoopInstaller/Nonportable
that referenced
this pull request
Aug 11, 2022
issaclin32
added a commit
to ScoopInstaller/Nonportable
that referenced
this pull request
Aug 11, 2022
issaclin32
added a commit
to ScoopInstaller/Nonportable
that referenced
this pull request
Aug 11, 2022
issaclin32
added a commit
to ScoopInstaller/Nonportable
that referenced
this pull request
Aug 11, 2022
issaclin32
added a commit
to ScoopInstaller/Nonportable
that referenced
this pull request
Aug 11, 2022
issaclin32
added a commit
to ScoopInstaller/Nonportable
that referenced
this pull request
Aug 11, 2022
issaclin32
added a commit
to ScoopInstaller/Nonportable
that referenced
this pull request
Aug 11, 2022
This was referenced Aug 13, 2022
issaclin32
added a commit
to ScoopInstaller/Extras
that referenced
this pull request
Aug 19, 2022
fixes #9060 related: ScoopInstaller/Scoop#5065
issaclin32
added a commit
to ScoopInstaller/Extras
that referenced
this pull request
Aug 19, 2022
related: 9060 related: ScoopInstaller/Scoop#5065
issaclin32
added a commit
to ScoopInstaller/Versions
that referenced
this pull request
Aug 19, 2022
* related: ScoopInstaller/Scoop#5065 * related: ScoopInstaller/Extras#9060 * Remove autoupdate because last update was in 2019
issaclin32
added a commit
to ScoopInstaller/Versions
that referenced
this pull request
Aug 19, 2022
* related: ScoopInstaller/Scoop#5065 * related: ScoopInstaller/Extras#9060 * Remove autoupdate because last update was in 2019
issaclin32
added a commit
to ScoopInstaller/Nonportable
that referenced
this pull request
Aug 21, 2022
Anki's installer does not work with quoted args related: ScoopInstaller/Scoop#5065
issaclin32
added a commit
to ScoopInstaller/Nonportable
that referenced
this pull request
Aug 21, 2022
issaclin32
added a commit
to ScoopInstaller/Nonportable
that referenced
this pull request
Aug 21, 2022
issaclin32
added a commit
to ScoopInstaller/Nonportable
that referenced
this pull request
Aug 21, 2022
issaclin32
added a commit
to ScoopInstaller/Nonportable
that referenced
this pull request
Aug 21, 2022
The app's installer does not work properly with quoted args related: ScoopInstaller/Scoop#5065
issaclin32
added a commit
to matthewjberger/scoop-nerd-fonts
that referenced
this pull request
Aug 24, 2022
related: #95 related: ScoopInstaller/Scoop#5065
This was referenced Aug 24, 2022
issaclin32
added a commit
to ScoopInstaller/Extras
that referenced
this pull request
Sep 1, 2022
closes #9122 related: ScoopInstaller/Scoop#5065
issaclin32
added a commit
to ScoopInstaller/Extras
that referenced
this pull request
Sep 1, 2022
related: #9122 related: ScoopInstaller/Scoop#5065
issaclin32
added a commit
to ScoopInstaller/Extras
that referenced
this pull request
Sep 2, 2022
fixes #9126 related: ScoopInstaller/Scoop#5065
issaclin32
added a commit
to ScoopInstaller/Extras
that referenced
this pull request
Sep 2, 2022
fixes #9090 related: ScoopInstaller/Scoop#5065
This was referenced Oct 29, 2022
Member
|
Can we revert this? It's a broken implementation. |
Member
|
Revert it in |
Contributor
Author
|
@niheaven Seems to make sense. But what about those manifests that have already been adjusted for this feature? Or if you already have an idea on how to make a bidirectionally compatible implementation? |
5 tasks
5 tasks
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.
Description
Use
ArgumentListin PowerShell 6.1 and later (built on .NET Core 2.1+), otherwise escape arguments using the general MSVC Runtime's rules in older versions.In the past, due to the arbitraryness of arguments, we are not able to handle all cases where arguments may contain spaces, quotes or other special characters for every automatic installer script that uses
Invoke-ExternalCommand. With this change, we don't have to escape arguments manually for most external commands any more. But for the following exceptions who basically don't follow the general MSVC Runtime's rules of parsing command line, just simply concatenate arguments with spaces to build the argument list string, which means we have to escape arguments manually for them: (case insensitive)cmd.exe,cscript.exe,wscript.exeandmsiexec.exe..bat,.cmd,.js,.vbsand.wsf.Ref: MS docs
Checklist:
developbranch.