aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/utility.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2019-08-16 22:39:07 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2019-08-17 13:07:36 +0300
commitbf2cf8cd53361826e51e01c2904f6fb4cb7502dc (patch)
tree534dc598757f42e6daff0107f4bfe533d6bf27a5 /libbuild2/utility.cxx
parent3712363ddf1be71b38321d2dde57d88f01a28afb (diff)
Add support for default options files
Diffstat (limited to 'libbuild2/utility.cxx')
-rw-r--r--libbuild2/utility.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/libbuild2/utility.cxx b/libbuild2/utility.cxx
index 506e88e..79545cc 100644
--- a/libbuild2/utility.cxx
+++ b/libbuild2/utility.cxx
@@ -143,7 +143,6 @@ namespace build2
else if (rb.sub (home))
return "~/" + rb.leaf (home).representation ();
}
-
#endif
return move (rb).representation ();
@@ -515,6 +514,13 @@ namespace build2
fail << "invalid current working directory: " << e;
}
- home = dir_path::home_directory ();
+ try
+ {
+ home = dir_path::home_directory ();
+ }
+ catch (const system_error& e)
+ {
+ fail << "unable to obtain home directory: " << e;
+ }
}
}