install-package policy execution
To install packages with package manager it's necessary to set the execution policy. It's not said in the API, and I think is not trivial for someone who is learning poershell. In fact if you don't set the policy, you can install packages, there is not error neither feedback about it is not being really installed, and when the process finishes you can see the status as installed whe you do get-package <package-name>. It is very confusing
This is an issue specific to the Chocolatey provider, which we acquired from that team. We will continue to work to get it resolved, but have no solution available at this time.
Flavien Michaleczek commented
The issue is still here.
PSVersion : 5.1.14328.1000 (Desktop)
PackageManagement Version : 22.214.171.124
ExecutionPolicy : Restricted
Command to reproduce the problem : Install-package firefox -ProviderName Chocolatey
Package Firefox is installed BUT Firefox is not installed and there is no warning.
The script "chocolateyInstall.ps1" from Firefox Chocolatey package is not execute because of the execution policy and we need an error to indicate the package has not be installed.
Quoc Truong commented
Thanks for using PackageManagement. Could you let me know the specific command that you run to get this bug? We added some warning messages in PackageManagement so this issue may actually already be solved in the latest version of PackageManagement.