Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

fix(tests): let run_tests.py --help exit 0 (#18814)

MarMar Labsda4a62b027c7
diff --git a/run_tests.py b/run_tests.py
index 4cfc29d784..67fb58d161 100755
--- a/run_tests.py
+++ b/run_tests.py
@@ -329,8 +329,10 @@ Examples:
return True
except SystemExit:
- # argparse already printed help, just exit
- return False
+ # argparse already printed help or the error and chose a status:
+ # 0 for --help, 2 for a bad argument. Let it through instead of
+ # collapsing both into a failure.
+ raise
except Exception as e:
self.print_error(f"Error parsing arguments: {e}")
return False