Make sure Alias0.dir is always in the build_dir

This commit is contained in:
Rudi Grinberg 2018-05-07 21:27:53 +07:00
parent 92220d34a3
commit 0f648f1387
1 changed files with 5 additions and 0 deletions

View File

@ -233,6 +233,11 @@ module Alias0 = struct
let make name ~dir =
assert (not (String.contains name '/'));
if not (Path.is_in_build_dir dir) then
Exn.code_error "Alias0.make: Invalid alias"
[ "name", Sexp.To_sexp.string name
; "dir", Path.sexp_of_t dir
];
{ dir; name }
let stamp_file t =