Skip to content
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 decompression failed when unzip PostgreSQL11 in PowerShell 5.1 #5243

Closed
wants to merge 2 commits into from

Conversation

YauHsien
Copy link

@YauHsien YauHsien commented Nov 7, 2022

File decompression failed in PowerShell 5.1.

Description

Change lib/core.ps1 L542 from
$s = $s -replace '(\\+)$', '$1$1'
to
$s = $s -replace '(\\+)$', '$1'

because in current case scoop install postgresql11,
lib/decompress.ps1#L9 give an argument $DestinationPath ends with "\"
and make it failed when decompressing the file with 7zip 22.0.

Motivation and Context

Relate to ScoopInstaller/Main#3816
Relate to #4647

How Has This Been Tested?

  1. Take a view of blame https://github.com/YauHsien/Scoop/blame/8aee6f99803d0f0aeab252e1d9d4848777185c51/lib/core.ps1#L544
    that segment is recently put in codebase.
  2. Workaround in two of my laptops.
  3. Scoop Core CI Tests https://github.com/YauHsien/Scoop/actions/runs/3409371442

Checklist:

  • I have read the Contributing Guide.
  • I have ensured that I am targeting the develop branch.
  • I have updated the documentation accordingly.
  • I have updated the tests accordingly.
  • I have added an entry in the CHANGELOG.

Add a line for fixing 3816
Fix by approaching ending backslashes of arguments in function Invoke-ExternalCommand.
@niheaven
Copy link
Member

niheaven commented Nov 7, 2022

The trimming slash has been fixed in #5195 and is not related to #4647. Please wait for next release of Scoop. Thanks for contribution, though.

@niheaven niheaven closed this Nov 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants