From: Ardis Lu Date: Mon, 27 May 2024 21:51:42 +0000 (-0700) Subject: Use cross-platform delimiter to split PSModulePath X-Git-Url: https://git.ardis.lu/?a=commitdiff_plain;h=becb28abdd3d6739aa725cf7dbef5f5543d8bb7d;p=ArdisUtilities Use cross-platform delimiter to split PSModulePath Linux and MacOS use ":" instead of ";" --- diff --git a/install.ps1 b/install.ps1 index 880a1a4..e31e807 100644 --- a/install.ps1 +++ b/install.ps1 @@ -64,7 +64,7 @@ function Install-ArdisUtilities { Import-Module $module if ($Persist) { - $destination = ($env:PSModulePath -Split ';')[0] + $destination = ($env:PSModulePath -Split [IO.Path]::PathSeparator)[0] # If no folder is found from PSModulePath, use default location for the CurrentUser scope. See: # https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_psmodulepath