aboutsummaryrefslogtreecommitdiff
path: root/bpkg/bpkg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'bpkg/bpkg.cxx')
-rw-r--r--bpkg/bpkg.cxx16
1 files changed, 13 insertions, 3 deletions
diff --git a/bpkg/bpkg.cxx b/bpkg/bpkg.cxx
index 0da8c58..170a7fe 100644
--- a/bpkg/bpkg.cxx
+++ b/bpkg/bpkg.cxx
@@ -95,7 +95,7 @@ namespace bpkg
return default_options_files {
{path ("bpkg.options"), path (string ("bpkg-") + cmd + ".options")},
- nullopt /* start_dir */};
+ nullopt /* start */};
}
// Merge the default options and the command line options. Fail if options
@@ -234,15 +234,25 @@ init (const common_options& co,
if (!o.no_default_options ()) // Command line option.
try
{
+ bpkg::optional<dir_path> extra;
+ if (o.default_options_specified ())
+ extra = o.default_options ();
+
o = merge_options (
load_default_options<O, cli::argv_file_scanner, cli::unknown_mode> (
nullopt /* sys_dir */,
path::home_directory (),
+ extra,
options_files (cmd, o, args),
- [&trace, &verbosity] (const path& f, bool remote)
+ [&trace, &verbosity] (const path& f, bool r, bool o)
{
if (verbosity () >= 3)
- trace << "loading " << (remote ? "remote " : "local ") << f;
+ {
+ if (o)
+ trace << "treating " << f << " as " << (r ? "remote" : "local");
+ else
+ trace << "loading " << (r ? "remote " : "local ") << f;
+ }
}),
o);
}