goutamadwant commented on code in PR #12898:
URL: https://github.com/apache/seatunnel/pull/12898#discussion_r4321457256


##########
seatunnel-core/seatunnel-core-starter/src/main/java/org/apache/seatunnel/core/starter/utils/CommandLineUtils.java:
##########
@@ -76,21 +76,22 @@ public static <T extends CommandArgs> T parse(
             jCommander.parse(args);
             // The args is not belongs to SeaTunnel, add into engine original 
parameters
             obj.setOriginalParameters(jCommander.getUnknownOptions());
+            // Help must short-circuit before command validation: a bare 
--help has no
+            // operation/id, and validating it would report an unrelated 
argument error.
+            if (obj.isHelp()) {
+                exit(jCommander, 0);

Review Comment:
   +1 to @DanielLeens’s point. so i reproduced the Spark/Flink scripts treating 
help output as a command and failing with a syntax error. They use exit `234` 
for help and `0` for command execution. Could we preserve `234` for these 
starters, or update the scripts to distinguish help from commands? pls recheck 
this. thanks! 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to