From f141827fd49cc2ac01476efdbda73cae7336e4ff Mon Sep 17 00:00:00 2001 From: RightSexyOrc <86175513+RightSexyOrc@users.noreply.github.com> Date: Wed, 17 Apr 2024 16:07:58 +0000 Subject: [PATCH] Windows activated.ps1; check for existence of vars This may or may not be relevant, so please test on Windows; we've had several people report errors requiring this change w/ some other code and it may be relevant for this repo as well. Otherwise, pls ignore. Thank yee --- activated.ps1 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/activated.ps1 b/activated.ps1 index eb63e32c9a11..71e4a23d61da 100644 --- a/activated.ps1 +++ b/activated.ps1 @@ -4,9 +4,13 @@ $script_directory = Split-Path $MyInvocation.MyCommand.Path -Parent $command = $args[0] $parameters = [System.Collections.ArrayList]$args -$parameters.RemoveAt(0) +if ($parameters.Count -gt 0) { + $parameters.RemoveAt(0) +} & $script_directory/venv/Scripts/Activate.ps1 -& $command @parameters +if ($command) { + & $command @parameters +} exit $LASTEXITCODE