summaryrefslogtreecommitdiff
path: root/src/fs_path.h
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2022-01-15 20:08:10 +0000
committerEdward Thomson <ethomson@edwardthomson.com>2022-01-15 19:33:24 -0500
commitf7fcf6c07bb5c0e104cb0ba8c70858b5cba4c846 (patch)
treeedbb0d21c05e410253a2aa87067821e8f89320e2 /src/fs_path.h
parent7c804ab4f183df581b4480b85727b1c661f4dff1 (diff)
downloadlibgit2-ethomson/find_executable.tar.gz
path: introduce git_fs_path_find_executableethomson/find_executable
Provide a helper function to find an executable in the current process's PATH.
Diffstat (limited to 'src/fs_path.h')
-rw-r--r--src/fs_path.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/fs_path.h b/src/fs_path.h
index 9720d34ce..222c44abc 100644
--- a/src/fs_path.h
+++ b/src/fs_path.h
@@ -743,4 +743,10 @@ bool git_fs_path_supports_symlinks(const char *dir);
*/
int git_fs_path_validate_system_file_ownership(const char *path);
+/**
+ * Search the current PATH for the given executable, returning the full
+ * path if it is found.
+ */
+int git_fs_path_find_executable(git_str *fullpath, const char *executable);
+
#endif