au
au copied to clipboard
[Feature Request] Add PowerShell Core Support
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
Get-WebFile
is used during automatic chekcsuming which is a feature that doesn't need to be used at all (I almost never do and consider it deprecated, but I will not remove it as others use it a lot).
Regarding [System.Net.ServicePointManager]::SecurityProtocol
, this is one liner problem which is trivially easy to fix by somebody that uses AU on pwsh. I will skip v6 and jump to 7 so that will not be me. The point is this is not a deal breaker.
Think I ran into this trying to use au
with GitHub Actions, see: https://github.com/pjoe/loadem/runs/1254716907?check_suite_focus=true#step:9:92
heh, turns out it was defaulting to pwsh
(7), after explicitly using powershell
things are working as expected :)
I use it with pwsh7 locally tho...