aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bpkg/bpkg.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/bpkg/bpkg.cxx b/bpkg/bpkg.cxx
index 76b2533..28ba75f 100644
--- a/bpkg/bpkg.cxx
+++ b/bpkg/bpkg.cxx
@@ -446,8 +446,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 */,