mirror of
https://github.com/Pythagora-io/gpt-pilot.git
synced 2026-01-10 05:27:54 -05:00
Properly kill processes at port in win
This commit is contained in:
@@ -406,7 +406,7 @@ class Frontend(FileDiffMixin, GitMixin, BaseAgent):
|
||||
# kill frontend - both swagger and node
|
||||
if is_win:
|
||||
await self.process_manager.run_command(
|
||||
"Get-NetTCPConnection -LocalPort 5173 | ForEach-Object { Stop-Process -Id $_.OwningProcess -Force }",
|
||||
"""for /f "tokens=5" %a in ('netstat -ano ^| findstr :5173 ^| findstr LISTENING') do taskkill /F /PID %a""",
|
||||
show_output=False,
|
||||
)
|
||||
else:
|
||||
@@ -416,7 +416,7 @@ class Frontend(FileDiffMixin, GitMixin, BaseAgent):
|
||||
if self.state_manager.project.project_type == "node":
|
||||
if is_win:
|
||||
await self.process_manager.run_command(
|
||||
"Get-NetTCPConnection -LocalPort 3000 | ForEach-Object { Stop-Process -Id $_.OwningProcess -Force }",
|
||||
"""for /f "tokens=5" %a in ('netstat -ano ^| findstr :3000 ^| findstr LISTENING') do taskkill /F /PID %a""",
|
||||
show_output=False,
|
||||
)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user