diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2021-04-17 19:03:11 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2021-04-17 19:03:34 +0300 |
commit | e4c22fd4b9ba9782acd0c0a10866cbeaf8be694d (patch) | |
tree | 99e5eb0cb85214d14dd8f84c7254106290a9a8a9 | |
parent | f8e5cbf6c58fe2794172ba8b6a219e692fbddcec (diff) |
Fix pkg-build crashing on empty repository location
-rw-r--r-- | bpkg/pkg-build.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bpkg/pkg-build.cxx b/bpkg/pkg-build.cxx index 66e158c..9d9b384 100644 --- a/bpkg/pkg-build.cxx +++ b/bpkg/pkg-build.cxx @@ -2600,6 +2600,9 @@ namespace bpkg { string l (a, p); + if (l.empty ()) + fail << "empty repository location in '" << a << "'"; + // Search for the repository location in the database before trying // to parse it. Note that the straight parsing could otherwise fail, // being unable to properly guess the repository type. |