Move get_augmented_search_path to process library

We'll need this for the chainloader.
This commit is contained in:
Robbert van der Helm
2022-04-16 18:42:18 +02:00
parent c2794831da
commit 3cad93cb65
4 changed files with 69 additions and 70 deletions
+11
View File
@@ -45,6 +45,17 @@
*/
bool pid_running(pid_t pid);
/**
* Return the search path as defined in `$PATH`, with `~/.local/share/yabridge`
* appended to the end. Even though it likely won't be set, this does respect
* `$XDG_DATA_HOME`. I'd rather not do this since more magic makes things harder
* to comprehend, but I can understand that modifying your login shell's `PATH`
* environment variable can be a big hurdle if you've never done anything like
* that before. And since this is the recommended installation location, it
* makes sense to also search there by default.
*/
std::vector<ghc::filesystem::path> get_augmented_search_path();
/**
* Split a `PATH`-like environment variable on colons. These environment
* variables don't support escaping, which makes this a lot simpler.