aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-07-07 20:35:31 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-07-14 22:06:49 +0300
commitc004b0f6b8dd0ede917b90060fb0c97a91a239d2 (patch)
tree1e63685062893fdecf5a06017352fb3c710121a9
parente6f4761d2ed82a51eac73621d73e5ba088034380 (diff)
Fix crash when absolute path for 'source' sub-option is specified
-rw-r--r--bdep/new.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/bdep/new.cxx b/bdep/new.cxx
index d2a4229..318d4aa 100644
--- a/bdep/new.cxx
+++ b/bdep/new.cxx
@@ -426,6 +426,10 @@ namespace bdep
: nullptr) :
nullptr);
+ if (source != nullptr && source->absolute ())
+ fail << "invalid value '" << *source << "' for option "
+ << "--type|-t,source: absolute path";
+
// Validate vcs options.
//
vcs vc (o.vcs ());