@@ -286,7 +286,7 @@ Commands:
286286 digest|combine-sources|combine|docs Generate consolidated markdown documentation per project (.g.md).
287287 clean|cleanup Remove build/output artifact directories (bin/obj/node_modules/etc.).
288288 repl|shell Run C# REPL (dotnet tool csharprepl) after tool restore.
289- kill-dotnet Interactive (or non- interactive with -ProcessId) termination of a dotnet process .
289+ kill-dotnet Terminate a dotnet process ( interactive selection or direct -ProcessId). No confirmation .
290290 help|? Show this help.
291291
292292combine-sources Parameters (defaults shown):
@@ -312,8 +312,8 @@ Examples:
312312 pwsh -File .vscode/tasks-misc.ps1 digest -OutputDirectory ./.tmp/docs -StripComments true -StripEmptyLines true
313313 pwsh -File .vscode/tasks-misc.ps1 clean
314314 pwsh -File .vscode/tasks-misc.ps1 repl
315- pwsh -File .vscode/tasks-misc.ps1 kill-dotnet # interactive selection
316- pwsh -File .vscode/tasks-misc.ps1 kill-dotnet -ProcessId 1234 -ForceKill # non-interactive
315+ pwsh -File .vscode/tasks-misc.ps1 kill-dotnet # interactive selection (no confirmation)
316+ pwsh -File .vscode/tasks-misc.ps1 kill-dotnet -ProcessId 1234 # direct kill (no confirmation)
317317
318318Exit Codes:
319319 0 success, non-zero on failure.
@@ -394,21 +394,7 @@ function Kill-DotNetProcess() {
394394 $proc = Get-Process - Id $selectedPid - ErrorAction SilentlyContinue
395395 if (-not $proc ){ Write-Host (" Process with PID {0} no longer exists." -f $selectedPid ) - ForegroundColor Yellow; $global :LASTEXITCODE = 0 ; return }
396396 Write-Host (" Target: {0} (PID {1})" -f $proc.ProcessName , $selectedPid ) - ForegroundColor Cyan
397- if (-not $ForceKill ){
398- if ($ProcessId -gt 0 ){
399- $confirmRaw = Read-Host (" Type YES to confirm kill of PID {0} ({1}) or press Enter to cancel" -f $selectedPid , $proc.ProcessName )
400- if ($confirmRaw -ne ' YES' ){ Write-Host ' Kill aborted.' - ForegroundColor Yellow; $global :LASTEXITCODE = 0 ; return }
401- }
402- elseif (-not $spectreUnavailable ){
403- $confirm = Read-SpectreSelection - Title (" Confirm kill of PID {0} ({1})" -f $selectedPid , $proc.ProcessName ) - Choices @ (' No' , ' Yes' ) - PageSize 5
404- if ($confirm -ne ' Yes' ){ Write-Host ' Kill aborted.' - ForegroundColor Yellow; $global :LASTEXITCODE = 0 ; return }
405- } else {
406- $confirmRaw2 = Read-Host (" Type YES to confirm kill of PID {0} ({1})" -f $selectedPid , $proc.ProcessName )
407- if ($confirmRaw2 -ne ' YES' ){ Write-Host ' Kill aborted.' - ForegroundColor Yellow; $global :LASTEXITCODE = 0 ; return }
408- }
409- } else {
410- Write-Host ' ForceKill specified; skipping confirmation.' - ForegroundColor DarkYellow
411- }
397+ # Confirmation omitted per user request; proceed immediately.
412398 try {
413399 Stop-Process - Id $selectedPid - Force - ErrorAction Stop
414400 Write-Host (" Process {0} terminated." -f $selectedPid ) - ForegroundColor Green
0 commit comments