소스 검색

Don't show error logs on sigint (#1781)

Nikhil Rao 1 년 전
부모
커밋
47d789e9a6
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      reflex/utils/processes.py

+ 2 - 1
reflex/utils/processes.py

@@ -217,7 +217,8 @@ def stream_logs(message: str, process: subprocess.Popen):
             logs.append(line)
             yield line
 
-    if process.returncode != 0:
+    # Check if the process failed (not printing the logs for SIGINT).
+    if process.returncode not in [0, -2]:
         console.error(f"{message} failed with exit code {process.returncode}")
         for line in logs:
             console.error(line, end="")