Skip to content

Commit

Permalink
Verify whether SourceLocation is a UNC path and select the appropriat…
Browse files Browse the repository at this point in the history
…e ApiVersion (#1479)
  • Loading branch information
kborowinski authored Dec 20, 2023
1 parent 3ace926 commit cbac618
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Microsoft.PowerShell.PSResourceGet.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function Import-PSGetRepository {
Trusted = $_.Trusted
PassThru = $true
Force = $Force
ApiVersion = 'v2'
ApiVersion = if ([Uri]::new($_.SourceLocation).Scheme -eq 'file') {'local'} else {'v2'}
}
Register-PSResourceRepository @registerPSResourceRepositorySplat
}
Expand Down

0 comments on commit cbac618

Please sign in to comment.