Open gkvappium opened 3 years ago
@SydneyhSmith could you please take a look into this issue?
@gkvappium are you having this issue when you use Register-PSRepository? If so can you provide the full -debug and -verbose log?
@alerickson ,thanks for looking into it. Please find below the full logs. Please note that the same code/commands are working on Windows. I see this problem only on Mac (URL,Repo name etc are all valid and working. I've just changed it a bit as per the privacy guidelines of the organization. Please don't mind.)
I've added the full log in gist https://gist.github.com/gkvappium/fd3449863e3820a510cba74e3efe9664 please do take a look
Any inputs on this @alerickson ?
Steps to reproduce
Check if PowerShell repository exists on local machine
if ($null -eq (Get-PSRepository | Where-Object { $_.Name -eq "TestPsModulesRepo" })) { Write-Host "Registering PowerSHellGet Repo 'TestPsModulesRepo'" Register-PackageSource -Name "TestPsModulesRepo" -Location "$FeedUrl" -ProviderName "PowerShellGet" -Force -Credential $credential -Trusted }
Expected behavior
Package source should get registered. Worked fine for me on Windows. But I hit the error only on Mac
Actual behavior
DEBUG: 00:00:00.0724656 ProviderName: PowerShellGet DEBUG: 00:00:00.0736562 INVOKING PowerShell Fn Resolve-PackageSource with args that has length 0 DEBUG: 00:00:00.0746526 In PowerShellGet Provider - 'Resolve-PackageSource'. DEBUG: 00:00:00.0796019 PowerShell Script 'PSModule' Function 'Resolve-PackageSource' returns null. Register-PackageSource: The property 'Name' cannot be found on this object. Verify that the property exists.
Environment data
Name Value ---- ----- PSVersion 7.0.4 PSEdition Core GitCommitId 7.0.4
OS Darwin 19.6.0 Darwin Kernel Version 19.6.0: Mon… Platform Unix PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0
ModuleType Version PreRelease Name PSEdition ExportedCommands
Script 1.4.7 PackageManagement Desk {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource…} Script 2.2.5 PowerShellGet Desk {Find-Command, Find-DSCResource, Find-Module, Find-RoleCapability…}
ModuleType Version PreRelease Name PSEdition ExportedCommands
Script 1.4.7 PackageManagement Desk {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource…} Script 2.2.5 PowerShellGet Desk {Find-Command, Find-DSCResource, Find-Module, Find-RoleCapability…}