insomnimus / ps-dotenv

A feature complete and unintrusive direnv for Powershell Core
MIT License
65 stars 3 forks source link

Execution Policy #3

Closed ohuu closed 2 years ago

ohuu commented 2 years ago

Using the release archive I get an error when starting powershell.

Line |
   5 |  Import-Module Dotenv
     |  ~~~~~~~~~~~~~~~~~~~~
     | File C:\Users\Oliver\Documents\PowerShell\Modules\Dotenv\Dotenv.psm1 cannot be loaded. The file C:\Users\Oliver\Documents\PowerShell\Modules\Dotenv\Dotenv.psm1 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.

I can set the execution policy to unrestricted but this seems wrong. is there a way to digitally sign the release?

insomnimus commented 2 years ago

Hi, thank you for opening an issue.

As far as i know you need to set the execution policy to make use of 3rd party modules. I'm not certain how to go about digitally signing the module, I will do some research when I get the time.

Meanwhile Set-ExecutionPolicy RemoteSigned should be enough (which is what I use).

I'm not sure but perhaps if I upload the module to PS Gallery, you maybe able to fetch it from there.

I'm already planning to release to the PS Gallery, let me know if it's urgent and I'll do it in a day or two.

insomnimus commented 2 years ago

I'm closing the issue as it's not directly related to Dotenv.