diff --git a/test-server/end-debug-server-process.ps1 b/test-server/end-debug-server-process.ps1 index 6707e13..69739ad 100644 --- a/test-server/end-debug-server-process.ps1 +++ b/test-server/end-debug-server-process.ps1 @@ -1,3 +1,8 @@ -$sID = Get-Item -Path ./pid.temp | Get-Content -Tail 1 -Stop-Process -Id $sID -Remove-Item "./pid.temp" +if (Test-Path ./pid.temp) { + $sID = Get-Item -Path ./pid.temp | Get-Content -Tail 1 + if (Get-Process -Id $sID -ErrorAction SilentlyContinue) { + Stop-Process -Id $sID + } + Remove-Item "./pid.temp" +} + diff --git a/test-server/start-debug-server-process.ps1 b/test-server/start-debug-server-process.ps1 index b6eb63f..65ecb9c 100644 --- a/test-server/start-debug-server-process.ps1 +++ b/test-server/start-debug-server-process.ps1 @@ -1,3 +1,3 @@ -$SID = Start-Process java -ArgumentList "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=25566", "-Xms512M", "-Xmx1G", "-jar", "paper-195.jar" -NoNewWindow -PassThru +$SID = Start-Process java -ArgumentList "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=25566", "-Xms512M", "-Xmx1G", "-jar", "paper-195.jar", "nogui" -PassThru $SID = $SID.Id $SID | Out-File -FilePath "pid.temp" \ No newline at end of file