aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build2/install/rule.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/build2/install/rule.cxx b/build2/install/rule.cxx
index f764363..75de96f 100644
--- a/build2/install/rule.cxx
+++ b/build2/install/rule.cxx
@@ -340,6 +340,9 @@ namespace build2
// installation directory name, e.g., bin, sbin, lib, etc. Look it
// up and recurse.
//
+ if (d.empty ())
+ fail << "empty installation directory name";
+
const string& sn (*d.begin ());
const string var ("install." + sn);
if (const dir_path* dn = lookup_install<dir_path> (s, var))