aboutsummaryrefslogtreecommitdiff
path: root/src/nix-build
diff options
context:
space:
mode:
authorAlain Zscheile <zseri.devel@ytrizja.de>2022-05-04 07:44:32 +0200
committerGitHub <noreply@github.com>2022-05-04 07:44:32 +0200
commit1385b2007804c8a0370f2a6555045a00e34b07c7 (patch)
tree3f83e56e03bd60d6c07d0ee14e70949df04b9e0f /src/nix-build
parent9489b4b7ef73ab20e8f49213d8711ca56b59107e (diff)
Get rid of most `.at` calls (#6393)
Use one of `get` or `getOr` instead which will either return a null-pointer (with a nicer error message) or a default value when the key is missing.
Diffstat (limited to 'src/nix-build')
-rw-r--r--[-rwxr-xr-x]src/nix-build/nix-build.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc
index faa8c078f..519855ea3 100755..100644
--- a/src/nix-build/nix-build.cc
+++ b/src/nix-build/nix-build.cc
@@ -440,7 +440,7 @@ static void main_nix_build(int argc, char * * argv)
env["NIX_STORE"] = store->storeDir;
env["NIX_BUILD_CORES"] = std::to_string(settings.buildCores);
- auto passAsFile = tokenizeString<StringSet>(get(drv.env, "passAsFile").value_or(""));
+ auto passAsFile = tokenizeString<StringSet>(getOr(drv.env, "passAsFile", ""));
bool keepTmp = false;
int fileNr = 0;