1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2024-09-19 10:50:24 -04:00

local-derivation-goal.cc: Remove *all* trailing slashes

(cherry picked from commit dd26f41379)
This commit is contained in:
Robert Hensing 2024-03-24 00:45:57 +01:00
parent 28fc0e4f58
commit d1848506f8

View file

@ -2119,7 +2119,8 @@ void LocalDerivationGoal::runChild()
Path globalTmpDir = canonPath(defaultTempDir(), true);
/* They don't like trailing slashes on subpath directives */
if (globalTmpDir.back() == '/') globalTmpDir.pop_back();
while (!globalTmpDir.empty() && globalTmpDir.back() == '/')
globalTmpDir.pop_back();
if (getEnv("_NIX_TEST_NO_SANDBOX") != "1") {
builder = "/usr/bin/sandbox-exec";