-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(core): Fix "Invoke-ExternalCommand" quoting rules #5945
Conversation
Could you please add unit tests for this type of situation to the Decompress testsuite? The NSIS Document says that there are two constrains of the
Probably the second constrain is the cause in this case? |
Test cases added, all done. |
I think I found out the cause of the $Process = New-Object System.Diagnostics.Process
$Process.StartInfo.FileName = '...exe'
$Process.StartInfo.ArgumentList.Add('/S')
$Process.StartInfo.ArgumentList.Add('/D=C:\temp\miniconda space space') If an arguement that is added to Probably we have to use the legacy argument escaping necessarily for NSIS installers, whether in PS5 or PS7, i.e. there needs to be one more condition of testing NSIS installers in Line 782 in 36026f1
|
Regarding to the TestCases, perhaps there should also be test nsis installers to validate such a situation. |
Indeed, that was my initial thought, but I was unable to find an efficient method to verify it. PEiD or Exeinfo should be able to accomplish the task, yet I was unable to discern their methodology. (Using a hex editor, I could find |
Reading hex to identify NSIS installers requires extra IO. What about picking the inactive #3502 up? That may take much work though, and a workaround (by just checking if |
Check NSIS installer by its arguments (should have |
That's the workaround I was thinking of. |
also closes ScoopInstaller/Extras#13160. When is this fix expected to be released? |
In a few days. |
I would like to cherry-pick this and publish a patch release instead of waiting for days. And I'm seeing the sqlite cache feature needs some more tweaks to be available for master channel. WDYT? @niheaven |
Although I believe the SQLite cache feature is stable enough for the end user, cherry-picking some fixes to the main branch is a decision that requires careful consideration. I will proceed with it now and create a pull request. |
Description
Quoting rules...
There's a bug in PS5 if
extract_dir
has spaces when using 7z to extract the archive, and this PR tries to fix it.Motivation and Context
There's a known bug that NSIS's
/D
param doesn't work if the path has spaces in PS7, if we provide/D=xxx xxx
inArgumentList
, the NSIS installer doesn't recognize it, don't know why.How Has This Been Tested?
Local install affected apps in PS5 and add some test cases.
Checklist:
develop
branch.