Fix #mod_use in toplevel

Regression from #9283.

Fixes #9455
master
David Allsopp 2020-04-17 16:14:01 +01:00
parent 9568154248
commit 5abff44a3f
2 changed files with 2 additions and 2 deletions

View File

@ -176,7 +176,7 @@ Working version
points to the grammar.
(Andreas Abel, review by Xavier Leroy)
- #9283: add a new toplevel directive `#use_output "<command>"` to
- #9283, #9455, #9457: add a new toplevel directive `#use_output "<command>"` to
run a command and evaluate its output.
(Jérémie Dimino, review by David Allsopp)

View File

@ -445,7 +445,7 @@ let use_file ppf wrap_mode name =
| filename ->
let ic = open_in_bin filename in
Misc.try_finally ~always:(fun () -> close_in ic)
(fun () -> use_channel ppf false ic name filename)
(fun () -> use_channel ppf wrap_mode ic name filename)
| exception Not_found ->
fprintf ppf "Cannot find file %s.@." name;
false