Make target_hint not fail when target is Path.root

fix #468
This commit is contained in:
Rudi Grinberg 2018-02-01 16:22:11 +08:00
parent 5881f4301d
commit 56c6f3bee7
1 changed files with 5 additions and 1 deletions

View File

@ -443,7 +443,11 @@ let resolve_package_install setup pkg =
let target_hint (setup : Main.setup) path =
assert (Path.is_local path);
let sub_dir = Path.parent path in
let sub_dir =
if Path.is_root path then
path
else
Path.parent path in
let candidates = Build_system.all_targets setup.build_system in
let candidates =
if Path.is_in_build_dir path then