diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2022-06-22 22:43:53 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2022-06-23 01:32:46 +0200 |
commit | d3176ce076407ef3e63667c0436bccf8be317ae4 (patch) | |
tree | 8dcaaab834d6afa14948239e6e6c864ba025e8e6 /src/libutil/util.hh | |
parent | 3c48c4b4f7a8d5a7b045b9dbee1310d20ca7750b (diff) |
Fix build-remote in nix-static
'build-remote' is now executed via /proc/self/exe so it always works.
Diffstat (limited to 'src/libutil/util.hh')
-rw-r--r-- | src/libutil/util.hh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libutil/util.hh b/src/libutil/util.hh index 90418b04d..d3ed15b0b 100644 --- a/src/libutil/util.hh +++ b/src/libutil/util.hh @@ -149,10 +149,14 @@ std::vector<Path> getConfigDirs(); /* Return $XDG_DATA_HOME or $HOME/.local/share. */ Path getDataDir(); +/* Return the path of the current executable. */ +std::optional<Path> getSelfExe(); + /* Create a directory and all its parents, if necessary. Returns the list of created directories, in order of creation. */ Paths createDirs(const Path & path); -inline Paths createDirs(PathView path) { +inline Paths createDirs(PathView path) +{ return createDirs(Path(path)); } |