Fix code error in expansion

Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
This commit is contained in:
Rudi Grinberg 2018-07-13 11:38:32 +02:00
parent b0e39d30f0
commit 0db9356692
1 changed files with 3 additions and 2 deletions

View File

@ -315,8 +315,9 @@ module Unexpanded = struct
match f fn with
| [x] -> Value.to_path ~dir x
| _ ->
Exn.code_error "Ordered_set_lang.Unexpanded.expand path"
["fn", String_with_vars.sexp_of_t fn]
Loc.fail (String_with_vars.loc fn)
"An unquoted templated expanded to more than one value. \
A file path is expected in this position."
in
match Path.Map.find files_contents path with
| Some x -> x