diff --git a/Tests/PSGetFindModule.Tests.ps1 b/Tests/PSGetFindModule.Tests.ps1 index 93aa2155..a1270694 100644 --- a/Tests/PSGetFindModule.Tests.ps1 +++ b/Tests/PSGetFindModule.Tests.ps1 @@ -613,7 +613,7 @@ Describe "Azure Artifacts Credential Provider Integration" -Tags 'BVT' { UnRegister-PSRepository -Name $repoName -ErrorAction SilentlyContinue -WarningAction SilentlyContinue } - it "Register-PackageSource using Visual Studio installed credential provider" -Skip:(!$VSinstalledCredProvider -or !$IsWindows) { + it "Register-PackageSource using Visual Studio installed credential provider" -Skip:(!$VSinstalledCredProvider) { Register-PSRepository $repoName -SourceLocation $testLocation (Get-PSRepository -Name $repoName).Name | should match $repoName diff --git a/src/PowerShellGet/public/psgetfunctions/Get-CredsFromCredentialProvider.ps1 b/src/PowerShellGet/public/psgetfunctions/Get-CredsFromCredentialProvider.ps1 index 399a4015..f35b01a6 100644 --- a/src/PowerShellGet/public/psgetfunctions/Get-CredsFromCredentialProvider.ps1 +++ b/src/PowerShellGet/public/psgetfunctions/Get-CredsFromCredentialProvider.ps1 @@ -43,10 +43,10 @@ function Get-CredsFromCredentialProvider { } else { # Option 1b) Find User-location - The NuGet Home location - %UserProfile%/.nuget/plugins/ - $path = "`"$env:UserProfile/.nuget/plugins/netcore/CredentialProvider.Microsoft/CredentialProvider.Microsoft.dll`""; + $path = "$($env:UserProfile)/.nuget/plugins/netcore/CredentialProvider.Microsoft/CredentialProvider.Microsoft.dll"; if ($script:IsLinux -or $script:IsMacOS) { - $path = "`"$HOME/.nuget/plugins/netcore/CredentialProvider.Microsoft/CredentialProvider.Microsoft.dll`""; + $path = "$($HOME)/.nuget/plugins/netcore/CredentialProvider.Microsoft/CredentialProvider.Microsoft.dll"; } if (Test-Path $path -PathType Leaf) { $credProviderPath = $path @@ -68,7 +68,7 @@ function Get-CredsFromCredentialProvider { return $null } - $vswhereExePath = "`"$programFiles\\Microsoft Visual Studio\\Installer\\vswhere.exe`"" + $vswhereExePath = "$($programFiles)\\Microsoft Visual Studio\\Installer\\vswhere.exe" if (!(Test-Path $vswhereExePath -PathType Leaf)) { return $null }