JustinGrote / ModuleFast

A "fast and loose" way to install modules from Powershell Gallery quickly. Meant for CICD, not production
Other
77 stars 5 forks source link

Update Modules with -Update fails #5

Closed Outek closed 8 months ago

Outek commented 1 year ago

Hi Justin,

I try to update an existing Module to the latest version with ModuleFast, but i get this error:

PS C:\Windows\System32> Install-ModuleFast PSBurger -NoProfileUpdate -NoPSModulePathUpdate -Source "https://<urltoartifactory>/artifactory/api/nuget/windows-powershellgallery-local" -Update -Debug
DEBUG: PSModulePath C:\Program Files\PowerShell\Modules is configured but does not exist, skipping...
DEBUG: c:\program files\powershell\7.3.4\Modules does not have a PSBurger folder. Skipping...
DEBUG: PSBurger: Found a matching module version 1.5.5 at C:\Program Files\WindowsPowerShell\Modules\PSburger\1.5.5\PSburger.psd1, but -Update was specified and the module spec allows for higher versions. Checking remote for updates...
ConvertFrom-Json: Conversion from JSON failed with error: Unexpected character encountered while parsing value: <. Path '', line 0,
position 0.
$PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.3.4
PSEdition                      Core
GitCommitId                    7.3.4
OS                             Microsoft Windows 10.0.20348
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Do you have any idea, what the problem can be?

JustinGrote commented 8 months ago

@Outek sorry for the delay. This should be fixed in the latest main branch version, can you try this?

& ([scriptblock]::Create((iwr 'bit.ly/modulefastmain'))) -UseMain PSBurger -NoProfileUpdate -NoPSModulePathUpdate -Source "https://<urltoartifactory>/artifactory/api/nuget/windows-powershellgallery-local" -Update -Debug

JustinGrote commented 8 months ago

I'm going to close for now as I can get it to work bbut if you stil have issues let me know and we can reopen. Thanks!