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, 9 insertions, 1 deletions
diff --git a/libbuild2/utility.cxx b/libbuild2/utility.cxx
index 10e2380..af4768c 100644
--- a/libbuild2/utility.cxx
+++ b/libbuild2/utility.cxx
@@ -6,6 +6,7 @@
#include <time.h> // tzset() (POSIX), _tzset() (Windows)
+#include <cerrno> // ENOENT
#include <cstring> // strlen(), str[n]cmp()
#include <iostream> // cerr
@@ -183,7 +184,7 @@ namespace build2
}
process_path
- try_run_search (const path& f,
+ run_try_search (const path& f,
bool init,
const dir_path& fallback,
bool path_only,
@@ -192,6 +193,13 @@ namespace build2
return process::try_path_search (f, init, fallback, path_only, paths);
}
+ [[noreturn]] void
+ run_search_fail (const path& f, const location& l)
+ {
+ fail (l) << "unable to execute " << f << ": " << process_error (ENOENT)
+ << endf;
+ }
+
process
run_start (uint16_t verbosity,
const process_env& pe,