mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-26 15:56:18 +02:00
getDefaultNixPath: ignore EPERM
This commit is contained in:
parent
b7cde90c6b
commit
a6c78ba367
1 changed files with 10 additions and 5 deletions
|
@ -2620,6 +2620,7 @@ Strings EvalSettings::getDefaultNixPath()
|
|||
{
|
||||
Strings res;
|
||||
auto add = [&](const Path & p, const std::string & s = std::string()) {
|
||||
try {
|
||||
if (pathExists(p)) {
|
||||
if (s.empty()) {
|
||||
res.push_back(p);
|
||||
|
@ -2627,6 +2628,10 @@ Strings EvalSettings::getDefaultNixPath()
|
|||
res.push_back(s + "=" + p);
|
||||
}
|
||||
}
|
||||
} catch (SysError & e) {
|
||||
// swallow EPERM
|
||||
if (e.errNo != EPERM) throw;
|
||||
}
|
||||
};
|
||||
|
||||
if (!evalSettings.restrictEval && !evalSettings.pureEval) {
|
||||
|
|
Loading…
Reference in a new issue