From 0f648f1387990e4bfa2bc3348a6e56199771df0d Mon Sep 17 00:00:00 2001 From: Rudi Grinberg Date: Mon, 7 May 2018 21:27:53 +0700 Subject: [PATCH] Make sure Alias0.dir is always in the build_dir --- src/build_system.ml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/build_system.ml b/src/build_system.ml index 0594ecb9..2ca8095e 100644 --- a/src/build_system.ml +++ b/src/build_system.ml @@ -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 =