Skip to content
This repository was archived by the owner on Dec 2, 2021. It is now read-only.

Commit bd01658

Browse files
committed
fix help print
1 parent 1c2cf3e commit bd01658

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/emit.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,11 @@ function emit_body(cmd::NodeCommand, ptr::Int=1)
7979
end
8080
jl.otherwise = emit_error(cmd, :("Error: unknown command $(ARGS[$ptr])"))
8181
return quote
82-
$(emit_help(cmd, ptr))
82+
if length(ARGS) == $ptr && (ARGS[$(ptr)] == "-h" || ARGS[$(ptr)] == "--help")
83+
print($(help_str(cmd)))
84+
return 0
85+
end
86+
8387
$nargs_assert
8488
$(codegen_ast(jl))
8589
end

0 commit comments

Comments
 (0)