We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f187ca commit c57e8baCopy full SHA for c57e8ba
src/Microsoft.PowerShell.PSResourceGet.psm1
@@ -8,7 +8,12 @@ function Import-PSGetRepository {
8
# Use the -Force switch to overwrite existing repositories.
9
[switch]$Force
10
)
11
- if ($IsWindows) {
+
12
+ $Runtime = [System.Runtime.InteropServices.RuntimeInformation]
13
+ $OSPlatform = [System.Runtime.InteropServices.OSPlatform]
14
+ # this checks for WindowsPwsh and Core
15
+ $IsOSWindows = $Runtime::IsOSPlatform($OSPlatform::Windows)
16
+ if ($IsOSWindows) {
17
$PSGetAppLocalPath = Microsoft.PowerShell.Management\Join-Path -Path $env:LOCALAPPDATA -ChildPath 'Microsoft\Windows\PowerShell\PowerShellGet\'
18
}
19
else {
0 commit comments