Skip to content

Commit

Permalink
use windows check that will account for Windows PS
Browse files Browse the repository at this point in the history
  • Loading branch information
anamnavi committed Sep 5, 2023
1 parent 6f187ca commit afcc057
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Microsoft.PowerShell.PSResourceGet.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ function Import-PSGetRepository {
# Use the -Force switch to overwrite existing repositories.
[switch]$Force
)
if ($IsWindows) {

$IsOSWindows = $Runtime::IsOSPlatform($OSPlatform::Windows)
if ($IsOSWindows) {
$PSGetAppLocalPath = Microsoft.PowerShell.Management\Join-Path -Path $env:LOCALAPPDATA -ChildPath 'Microsoft\Windows\PowerShell\PowerShellGet\'
}
else {
Expand Down

0 comments on commit afcc057

Please sign in to comment.