From bf2cf8cd53361826e51e01c2904f6fb4cb7502dc Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 16 Aug 2019 22:39:07 +0300 Subject: Add support for default options files --- libbuild2/utility.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'libbuild2/utility.cxx') 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; + } } } -- cgit v1.1