aboutsummaryrefslogtreecommitdiff
path: root/bdep/bdep.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'bdep/bdep.cxx')
-rw-r--r--bdep/bdep.cxx20
1 files changed, 13 insertions, 7 deletions
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<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 (),
+ 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.
//