diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2023-02-02 12:16:43 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2023-02-02 12:16:43 +0200 |
commit | 17a84035997c0e9aef7c784dc81e84a591a83177 (patch) | |
tree | 51dddbf212f352bd7266270390861631d456bd65 | |
parent | 5ae1ebd7facda3c6bddb6b0a2b0b9899eea04607 (diff) |
Complete and normalize --default-options path
-rw-r--r-- | bdep/bdep.cxx | 17 |
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 */, |