aboutsummaryrefslogtreecommitdiff
path: root/bdep
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-02-02 12:16:43 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-02-02 12:16:43 +0200
commit17a84035997c0e9aef7c784dc81e84a591a83177 (patch)
tree51dddbf212f352bd7266270390861631d456bd65 /bdep
parent5ae1ebd7facda3c6bddb6b0a2b0b9899eea04607 (diff)
Complete and normalize --default-options path
Diffstat (limited to 'bdep')
-rw-r--r--bdep/bdep.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/bdep/bdep.cxx b/bdep/bdep.cxx
index 73c1302..02912d0 100644
--- a/bdep/bdep.cxx
+++ b/bdep/bdep.cxx
@@ -258,8 +258,25 @@ init (const common_options& co,
{
optional<dir_path> extra;
if (o.default_options_specified ())
+ {
extra = o.default_options ();
+ // Note that load_default_options() expects absolute and normalized
+ // directory.
+ //
+ try
+ {
+ if (extra->relative ())
+ extra->complete ();
+
+ extra->normalize ();
+ }
+ catch (const invalid_path& e)
+ {
+ fail << "invalid --default-options value " << e.path;
+ }
+ }
+
default_options<O> dos (
load_default_options<O, cli::argv_file_scanner, cli::unknown_mode> (
nullopt /* sys_dir */,