]> git.ardis.lu - ArdisUtilities/commitdiff
Use cross-platform delimiter to split PSModulePath
authorArdis Lu <ardisglu@gmail.com>
Mon, 27 May 2024 21:51:42 +0000 (14:51 -0700)
committerArdis Lu <ardisglu@gmail.com>
Mon, 27 May 2024 21:51:42 +0000 (14:51 -0700)
Linux and MacOS use ":" instead of ";"

install.ps1

index 880a1a4c4ba6ae7dec2e5f6cf5390fdac3f267ed..e31e8079c56a795c927f8191c3afee72f70a2c2d 100644 (file)
@@ -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
This page took 0.038135 seconds and 4 git commands to generate.