From 9a5041970d2f288b529e2892f15b1839543f3d5d Mon Sep 17 00:00:00 2001 From: Dawith Date: Sun, 1 Mar 2026 20:53:22 -0500 Subject: [PATCH] Launch script made compatible with ps v7+ --- winlaunch.ps1 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/winlaunch.ps1 b/winlaunch.ps1 index 97f8d93..c9d7e0d 100644 --- a/winlaunch.ps1 +++ b/winlaunch.ps1 @@ -2,18 +2,18 @@ # container with the appropriate volume bind mount. # Load environment variables from .env file -Get-Content .env | foreach { - $name, $value = $_.split('=') - if ([string]::IsNullOrWhiteSpace($name) -or $name.Contains('#')) { - return - } - Set-Content env:\$name $value + +Get-Content .env | ForEach-Object { + if ($_ -match '^\s*$' -or $_ -match '^\s*#') { return } + + $name, $value = $_ -split '=', 2 + Set-Variable -Name $name -Value $value } # Docker environment launch docker run --rm -it ` -v ${PWD}:/app/code ` - -v ${env:DATAPATH}:/app/workdir ` + -v "${DATAPATH}:/app/workdir" ` --gpus all ` --shm-size=4g ` --name geonosis `