aboutsummaryrefslogtreecommitdiff
path: root/bpkg/bpkg.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-08-19 23:39:38 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-08-22 12:55:29 +0300
commit5384724d937196e1e3f5c15fe443c0bff07896e6 (patch)
tree1657553f18585678321cb4a10a8c51f54a57f626 /bpkg/bpkg.cxx
parentfce2bf8086573a13eb39e1e8c65e615012486a58 (diff)
Make testscripts to ignore user's default options files
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);
}