Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

fix(rnd): fixed cli repeated star cmd quality of life

SwiftyOS60e0d4c530a8
diff --git a/rnd/autogpt_server/autogpt_server/cli.py b/rnd/autogpt_server/autogpt_server/cli.py
index e2f3c08217..0ccdca5911 100644
--- a/rnd/autogpt_server/autogpt_server/cli.py
+++ b/rnd/autogpt_server/autogpt_server/cli.py
@@ -43,11 +43,12 @@ def start():
if file_path.exists():
with open(file_path, "r", encoding="utf-8") as file:
pid = int(file.read())
- if psutil.pid_exists(pid):
- print("Server is already running")
- else:
- os.remove(file_path)
- return
+ if psutil.pid_exists(pid):
+ print("Server is already running")
+ exit(1)
+ else:
+ print("PID does not exist deleting file")
+ os.remove(file_path)
sp = subprocess.Popen(
["poetry", "run", "python", "autogpt_server/cli.py", "background"],