Can't load completions: `_ouch.ps1 is not digitally signed`
Version
0.6.1
Description
Add loading ouch completions into powershell by adding following line
. "C:\Program Files\ouch\completions\_ouch.ps1" into C:\Users\y\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
Current Behavior
During the Windows Terminal launch the following error message always appers:
. : File C:\Program Files\ouch\completions\_ouch.ps1 cannot be loaded. The file C:\Program
Files\ouch\completions\_ouch.ps1 is not digitally signed. You cannot run this script on the current system.
For more information about running scripts and setting execution policy, see about_Execution_Policies at
https:/go.microsoft.com/fwlink/?LinkID=135170.
At C:\Users\y\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1:15 char:3
+ . "C:\Program Files\ouch\completions\_ouch.ps1"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
There are no such errors with others completions files, for example with _yazi.ps1 or _rg.ps1.
Expected Behavior
Completions loads without error in the terminal.
Additional Information
No response
I admittedly have no idea why completion files in Powershell need to be digitally signed, I'm open to receiving fixes for this, or guidance in case it's a problem in my packages.
@yh-sb Did you get ouch from some package manager? Like winget, chocolatey or such?
Or did you build it yourself?
@vrmiguel, I downloaded ouch from the GitHub Releases (ouch-x86_64-pc-windows-gnu.zip).
The .ps1 file was generated by clap but they don't have any issues referring to this.
I can't test or fix this, need someone to hop in and check it for you.