Skip to content

Commit

Permalink
Fix #1103
Browse files Browse the repository at this point in the history
Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
  • Loading branch information
rgrinberg committed Aug 6, 2018
1 parent 99e0686 commit f74a064
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
next
----

- Fix `$ jbuilder --dev` (#1104, fixes #1103, @rgrinberg)


1.1.0 (06/08/2018)
------------------

Expand Down
7 changes: 4 additions & 3 deletions bin/main.ml
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,10 @@ let common =
& info ["dev"] ~docs
~doc:{|Same as $(b,--profile dev)|})
in
match dev with
| false -> `Ok false
| true ->
match dev, Which_program.t with
| false, (Dune | Jbuilder) -> `Ok false
| true, Jbuilder -> `Ok true
| true, Dune ->
`Error
(true, "--dev is no longer accepted as it is now the default.")
and profile =
Expand Down
4 changes: 0 additions & 4 deletions test/blackbox-tests/test-cases/dev-flag-1103/run.t
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
jbuilder --dev flag is accepted

$ jbuilder build --dev
dune: --dev is no longer accepted as it is now the default.
Usage: dune build [OPTION]... [TARGET]...
Try `dune build --help' or `dune --help' for more information.
[1]

dune --dev flag is rejected

Expand Down

0 comments on commit f74a064

Please sign in to comment.