aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/utility.cxx
diff options
context:
space:
mode:
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;
+ }
}
}