fix opt 6 exit not working

also continue fix attempt on sheepit not starting
This commit is contained in:
Nathan
2025-12-02 12:07:26 -07:00
parent 18683b4ad0
commit e568e02cdf
4 changed files with 5209 additions and 1532 deletions

View File

@@ -88,7 +88,16 @@ try {
continue
}
if ($input.Trim().ToLower() -eq 'detach') {
$normalized = $input.Trim()
if ($normalized.StartsWith(':')) {
$normalized = $normalized.TrimStart(':').Trim()
}
if ($normalized.Length -eq 0) {
continue
}
if ($normalized.ToLowerInvariant() -eq 'detach') {
break
}
@@ -97,9 +106,9 @@ try {
}
finally {
if ($logJob) {
Stop-Job -Job $logJob -Force -ErrorAction SilentlyContinue
Stop-Job -Job $logJob -ErrorAction SilentlyContinue
Receive-Job -Job $logJob -ErrorAction SilentlyContinue | Out-Null
Remove-Job -Job $logJob -Force -ErrorAction SilentlyContinue
Remove-Job -Job $logJob -ErrorAction SilentlyContinue
}
Write-Host "Detached from worker $WorkerName." -ForegroundColor Cyan