Fix the lookup of the executable in: jbuilder exec

This commit is contained in:
Jeremie Dimino 2017-04-10 18:10:55 +01:00
parent 6d57a0deb8
commit f134182f82
2 changed files with 6 additions and 1 deletions

View File

@ -22,6 +22,10 @@
the jbuilder invocation in opam files and make it more future proof
(#52)
- Fix the lookup of the executable in =jbuilder exec foo=. Before,
even if =foo= was to be installed, the freshly built version wasn't
selected
* 1.0+beta6 (29/03/2017)
- Add an =(executable ...)= stanza for single executables (#33)

View File

@ -582,7 +582,8 @@ let exec =
Format.eprintf "@{<Error>Error@}: Context %S not found!@." context;
die ""
in
match Context.which context prog with
let path = Config.local_install_bin_dir ~context:context.name :: context.path in
match Bin.which ~path prog with
| None ->
Format.eprintf "@{<Error>Error@}: Program %S not found!@." prog;
die ""