Skip to content

Commit

Permalink
fix: correctly validate argument to top-module (#6796)
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
  • Loading branch information
rgrinberg committed Dec 28, 2022
1 parent 904834d commit aaa7880
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ Unreleased
- Allow `--sandbox` to affect `ocamldep` invocations. Previously, they were
wrongly marked as incompatible (#6749, @rgrinberg)

- Validate the command line arguments for `$ dune ocaml top-module`. This
command requires one positional argument (#6796, fixes #6793, @rgrinberg)

3.6.1 (2022-11-24)
------------------

Expand Down
2 changes: 1 addition & 1 deletion bin/top.ml
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ module Module = struct
let term =
let+ common = Common.term
and+ module_path =
Arg.(value & pos 0 string "" & Arg.info [] ~docv:"MODULE")
Arg.(required & pos 0 (some string) None & Arg.info [] ~docv:"MODULE")
and+ ctx_name =
Common.context_arg ~doc:{|Select context where to build/run utop.|}
in
Expand Down

0 comments on commit aaa7880

Please sign in to comment.