From 33fadd17bde3f521a104a65e328cfc1a45ab3183 Mon Sep 17 00:00:00 2001 From: tian <11429339@qq.com> Date: Mon, 20 Jul 2026 14:13:49 +0800 Subject: [PATCH] fix: handle empty args in Start-Detached --- scripts/dev-env.ps1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/dev-env.ps1 b/scripts/dev-env.ps1 index 10b63ea..378fa2f 100644 --- a/scripts/dev-env.ps1 +++ b/scripts/dev-env.ps1 @@ -42,7 +42,11 @@ function Start-Detached { return $null } Write-Host " [START] $Name" -ForegroundColor Green - $proc = Start-Process -FilePath $Exe -ArgumentList $Args -WindowStyle Minimized -PassThru + if ($Args -and $Args.Count -gt 0) { + $proc = Start-Process -FilePath $Exe -ArgumentList $Args -WindowStyle Minimized -PassThru + } else { + $proc = Start-Process -FilePath $Exe -WindowStyle Minimized -PassThru + } Start-Sleep -Milliseconds 500 return $proc }