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

[Feature Request] Add PowerShell Core Support #13

Open
pauby opened this issue Oct 31, 2022 · 3 comments
Open

[Feature Request] Add PowerShell Core Support #13

pauby opened this issue Oct 31, 2022 · 3 comments
Labels
Improvement Issues that enhances existing functionality, or adds new features

Comments

@pauby
Copy link
Member

pauby commented Oct 31, 2022

Just a recommendation, currently run script.ps1 will encounter:

Exception setting "SecurityProtocol": "The requested security protocol is not supported."
At C:\Program Files\PowerShell\Modules\au\2018.5.18\Public\Update-Package.ps1:384 char:5
+     [System.Net.ServicePointManager]::SecurityProtocol = 'Ssl3,Tls,Tl ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [], SetValueInvocationException
+ FullyQualifiedErrorId : ExceptionWhenSetting

and

Get-WebFile : Exception calling "IsBypassed" with "1" argument(s): "Operation is not supported on this platform."
At C:\Users\Ruiyang\AppData\Local\Temp\chocolatey\au\chocolatey\helpers\functions\Get-ChocolateyWebFile.ps1:345 char:7
+       Get-WebFile -Url $url -FileName $fileFullPath -Options $options
+       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [Get-WebFile], MethodInvocationException
+ FullyQualifiedErrorId : PlatformNotSupportedException,Get-WebFile

Issue migrated from majkinetor/au#158

@pauby pauby added the Improvement Issues that enhances existing functionality, or adds new features label Oct 31, 2022
@Tucug
Copy link

Tucug commented Feb 28, 2023

Until now, PowerShell-core worked for us.
We observed that the last versions of PowerShell-core introduce an incompatibility with Au update scripts:

Running update_all with PowerShell-core 7.2.6 is successful.
Running update_all with PowerShell-core 7.3.2 results in the following error

VERBOSE: Failed mypackage
   [1/1] myPackage ERROR:
     Chocolatey v1.2.1 File specified is either not found or not a .nupkg file. 'myPackage.myVersion.nupkg ' (7.81s)

The regression is probably introduced for all versions of PowerShell-core 7.3
Please note the additional space in the nupkg string which might point to the issue.

Issue observed with chocolatey versions 1.1, 1.2, and 1.3 (no matter the choco version). Observed with PowerShell-core 7.3.2 and 7.3.3
Issue not observed with chocolatey version 1.1 + PowerShell 7.2.6
Issue not observed with chocolatey version 1.3 + PowerShell 7.2.6

I let the maintainer @pauby decide if it should be a separate bug issue or if here is fine.

@pauby
Copy link
Member Author

pauby commented Mar 2, 2023

@totofelder Can you raise a separate issue for this?

Issue not observed with chocolatey versions 1.1 and 1.3 with PowerShell 7.2.6

Could you clarify the issue wasn't observed with 1.2 because you didn't test it, or because it didn't happen?

@flcdrg
Copy link
Contributor

flcdrg commented Mar 3, 2023

Created separate issue for PS regression - #24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Issues that enhances existing functionality, or adds new features
Projects
None yet
Development

No branches or pull requests

3 participants