Open woter1832 opened 3 years ago
As per normal, it was me! I was using the wrong pipeline, designed to package for Chocolatey as opposed to PowerShellGet. This meant the NuPkg didn't have the .psd1 file in the root of the package, so it couldn't find the .psd1 file.
However, I'm not closing this as I would like to know why it is trying to use ..\AppData\Temp\..
. I would also recommend a better error message.
Thanks @woter1832! It is using ..\AppData\Local\Temp\..
as a temporary install location and once it validates the files it is then moved to the respective $env:PSModulesPath
location. Some of the error messaging in v2 is not that great, we are improving error messaging more in PowerShellGet v3, thank you for the feedback!
We've had a similar problem to this one. Whilst running Install-Package -Source
install-Package : Cannot find the path 'C:\Users\<user>\AppData\Local\Temp\1058270344\<OurPackage>\<OurPackage>.psd1' because it does not exist.
We found that if you provide the source as a URI
rather than a PackageProvider
(the URI being the same as the package provider registration) then the install-package
works OK. Maybe something to do with it going through a PackageProvider registration?
(With PowerShellGet 2.2.5 and 2.2.5.1)
Steps to reproduce
Expected behaviour
Install the module
Actual behaviour
What is it trying to do with
..\AppData\Local\Temp\..
? Why does it need that path? This has always worked in the past.Environment data