diff options
author | Alain Zscheile <zseri.devel@ytrizja.de> | 2022-05-04 07:44:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-04 07:44:32 +0200 |
commit | 1385b2007804c8a0370f2a6555045a00e34b07c7 (patch) | |
tree | 3f83e56e03bd60d6c07d0ee14e70949df04b9e0f /src/libexpr/get-drvs.cc | |
parent | 9489b4b7ef73ab20e8f49213d8711ca56b59107e (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/libexpr/get-drvs.cc')
-rw-r--r-- | src/libexpr/get-drvs.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libexpr/get-drvs.cc b/src/libexpr/get-drvs.cc index 11f2b279d..d616b3921 100644 --- a/src/libexpr/get-drvs.cc +++ b/src/libexpr/get-drvs.cc @@ -34,7 +34,7 @@ DrvInfo::DrvInfo(EvalState & state, ref<Store> store, const std::string & drvPat outputName = selectedOutputs.empty() - ? get(drv.env, "outputName").value_or("out") + ? getOr(drv.env, "outputName", "out") : *selectedOutputs.begin(); auto i = drv.outputs.find(outputName); |