aboutsummaryrefslogtreecommitdiff
path: root/build2/install
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-09-09 15:56:26 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-09-13 13:03:19 +0300
commitc49a4f0aeefd04ea6a269693d47d1e9d91ed8ad7 (patch)
tree5751dc3b69fdd8c9d1a3726906bf27c602c756d4 /build2/install
parentdb01a1161f86bbff5053c345dba9a5204ea91412 (diff)
Fix crashing on empty installation directory name
Diffstat (limited to 'build2/install')
-rw-r--r--build2/install/rule.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/build2/install/rule.cxx b/build2/install/rule.cxx
index ebab282..f3a9bf4 100644
--- a/build2/install/rule.cxx
+++ b/build2/install/rule.cxx
@@ -307,6 +307,10 @@ namespace build2
if (const dir_path* dn =
lookup_install<dir_path> (t.base_scope (), var))
{
+ if (dn->empty ())
+ fail << "empty installation directory for name " << sn <<
+ info << "did you specified empty config." << var << "?";
+
rs = resolve (t, *dn, &var);
d = rs.back ().dir / dir_path (++d.begin (), d.end ());
rs.emplace_back (move (d.normalize ()), rs.back ());