Closed ThomasNieto closed 6 months ago
Install-Package.Tests.ps1
This isn't my code but I'm working on a dedicated github action here that is working fine in the alpha if you want to try it: https://github.com/justingrote/modulefast-action
I ran into this issue testing the AnyPackage provider in Pester. It doesn't error on my machine just seems to be the runner. Originally had Install-Package Az
there and had the same issue when changing it directly to Install-ModuleFast Az
for testing to rule out the provider. It could be an issue between ModuleFast, Pester, and GH Actions image.
The problem with should not throw is that it swallows the stack trace, better to just set install-modulefast to erroraction stop
Looks to be windows runner specific, the linux one worked just fine https://github.com/JustinGrote/ModuleFast-action/actions/runs/7764313988/job/21177566222
Appears to not be detecting noninteractive mode in some circumstances
❌❯ pwsh -noni { & ([scriptblock]::Create((iwr 'bit.ly/modulefastmain'))) -UseMain; imf importexcel -destination TEMP: -destinationonly -verbose -debug }
WARNING: Parameter -Destination is set to a custom path not in your current PSModulePath. We will add it to your PSModulePath for this session. You can suppress this behavior with the -NoPSModulePathUpdate switch.
VERBOSE: Updating PSModulePath to include Temp:\
DEBUG: Skipping updating the profile because -NoProfileUpdate was specified
DEBUG: Creating new ModuleFast HTTP Client. This should only happen once!
VERBOSE: importexcel: Evaluating Module Specification
DEBUG: importexcel: Skipping PSModulePath Temp:\ - Configured but does not exist.
DEBUG: importexcel: 🔍 No installed versions matched the spec. Will check remotely.
DEBUG: importexcel: fetch registration index from https://preview.pwsh.gallery/index.json
DEBUG: importexcel: fetch info from https://preview.pwsh.gallery/importexcel/index.json
DEBUG: importexcel: Processing Response
DEBUG: importexcel: Received Response with 3 pages
DEBUG: importexcel: Found satisfying version 7.8.6 in the inlined index.
VERBOSE: ImportExcel(7.8.6): Added to install plan
Install-ModuleFast: PowerShell is in NonInteractive mode. Read and Prompt functionality is not available.
Something weird is happening here, in the meantime you can specify -confirm:$false
to install-modulefast as a workaround.
Should be fixed: https://github.com/JustinGrote/ModuleFast-action/actions/runs/7764683017
I'll be releasing 0.2.0 soon which will include this fix once I make sure the corresponding GitHub action doesn't have any further weirdness.