mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
Fix build-remote in nix-static
'build-remote' is now executed via /proc/self/exe so it always works.
This commit is contained in:
parent
3c48c4b4f7
commit
d3176ce076
7 changed files with 47 additions and 12 deletions
|
@ -633,6 +633,20 @@ Path getDataDir()
|
|||
}
|
||||
|
||||
|
||||
std::optional<Path> getSelfExe()
|
||||
{
|
||||
static std::optional<Path> cached = []()
|
||||
{
|
||||
#if __linux__
|
||||
return readLink("/proc/self/exe");
|
||||
#else
|
||||
return std::nullopt;
|
||||
#endif
|
||||
}();
|
||||
return cached;
|
||||
}
|
||||
|
||||
|
||||
Paths createDirs(const Path & path)
|
||||
{
|
||||
Paths created;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue