aboutsummaryrefslogtreecommitdiff
path: root/bpkg/utility.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2021-04-22 21:57:13 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2021-07-01 11:19:12 +0300
commitd77ca8720df495017139a24a59c502f53c07df9f (patch)
tree5093b9700607e0db35d6260ad766e7f171e2bf8f /bpkg/utility.cxx
parentaee787bce2b94a057ad8e6fd42e2cd901776e348 (diff)
Add support for associated configurations
Diffstat (limited to 'bpkg/utility.cxx')
-rw-r--r--bpkg/utility.cxx14
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