diff options
Diffstat (limited to 'bpkg/utility.cxx')
-rw-r--r-- | bpkg/utility.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/bpkg/utility.cxx b/bpkg/utility.cxx index ef61870..2f3f131 100644 --- a/bpkg/utility.cxx +++ b/bpkg/utility.cxx @@ -25,6 +25,7 @@ namespace bpkg // const dir_path certs_dir (dir_path (bpkg_dir) /= "certs"); const dir_path repos_dir (dir_path (bpkg_dir) /= "repos"); + const dir_path host_dir (dir_path (bpkg_dir) /= "host"); const dir_path current_dir ("."); @@ -117,6 +118,19 @@ namespace bpkg return d; } + dir_path + current_directory () + { + try + { + return dir_path::current_directory (); + } + catch (const system_error& e) + { + fail << "unable to obtain current directory: " << e << endf; + } + } + bool stderr_term; bool |