diff options
author | regnat <rg@regnat.ovh> | 2021-06-22 11:29:55 +0200 |
---|---|---|
committer | regnat <rg@regnat.ovh> | 2021-06-22 11:29:55 +0200 |
commit | 3b58dbb3561e02dc94e88b531d0942a7f8ccf8ea (patch) | |
tree | da6358fa23537c72ec62dd0fd53424e89c3ca1d3 | |
parent | 56605b468868b834e44a9700907b734428cb120a (diff) |
nix-shell: Replace resolving failure error by an assertion
This shouldn’t happen in practice, so better make it explicit
-rwxr-xr-x | src/nix-build/nix-build.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc index 05eb7e234..3fec2c06c 100755 --- a/src/nix-build/nix-build.cc +++ b/src/nix-build/nix-build.cc @@ -389,8 +389,7 @@ static void main_nix_build(int argc, char * * argv) if (settings.isExperimentalFeatureEnabled("ca-derivations")) { auto resolvedDrv = drv.tryResolve(*store); - if (!resolvedDrv) - throw Error("unable to resolve the derivation '%s'. nix-shell can’t continue", drvInfo.queryDrvPath()); + assert(resolvedDrv && "Successfully resolved the derivation"); drv = *resolvedDrv; } |