From a37431f8109cb67937ad5356e8209a7151ad5a61 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 19 Aug 2019 23:41:49 +0300 Subject: Make testscripts to ignore user's default options files --- bdep/bdep.cxx | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'bdep/bdep.cxx') diff --git a/bdep/bdep.cxx b/bdep/bdep.cxx index c8fe18b..1faac39 100644 --- a/bdep/bdep.cxx +++ b/bdep/bdep.cxx @@ -219,15 +219,25 @@ init (const common_options& co, if (!o.no_default_options ()) // Command line option. try { + bdep::optional extra; + if (o.default_options_specified ()) + extra = o.default_options (); + o = merge_options ( load_default_options ( nullopt /* sys_dir */, - path::home_directory (), + 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); } @@ -236,10 +246,6 @@ init (const common_options& co, fail << "unable to load default options files: " << e.first << ": " << e.second; } - catch (const system_error& e) - { - fail << "unable to obtain home directory: " << e; - } // Global initializations. // -- cgit v1.1