Jelajahi Sumber

print usage to stdout instead of stderr (closes #6363)

Simon Krajewski 8 tahun lalu
induk
melakukan
de97a6402d
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      src/compiler/main.ml

+ 1 - 1
src/compiler/main.ml

@@ -775,7 +775,7 @@ try
 			("--help-metas", Arg.Unit (fun () -> ()),": print help for all compiler metadatas");
 			("--help-metas", Arg.Unit (fun () -> ()),": print help for all compiler metadatas");
 			("<dot-path>", Arg.Unit (fun () -> ()),": compile the module specified by dot-path");
 			("<dot-path>", Arg.Unit (fun () -> ()),": compile the module specified by dot-path");
 		] in
 		] in
-		if !cmds = [] && not !did_something then Arg.usage help_spec usage;
+		if !cmds = [] && not !did_something then print_endline (Arg.usage_string help_spec usage);
 	end else begin
 	end else begin
 		ctx.setup();
 		ctx.setup();
 		Common.log com ("Classpath : " ^ (String.concat ";" com.class_path));
 		Common.log com ("Classpath : " ^ (String.concat ";" com.class_path));