From b5e42536977d84359f5fea3f42cfefdd46799eb1 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 2 Jul 2020 18:24:11 +0200 Subject: [PATCH] Fix abort in 'nix develop' --- src/libutil/hash.cc | 2 +- src/nix/develop.cc | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/libutil/hash.cc b/src/libutil/hash.cc index 01fae3044..1a3e7c5d8 100644 --- a/src/libutil/hash.cc +++ b/src/libutil/hash.cc @@ -370,7 +370,7 @@ string printHashType(HashType ht) default: // illegal hash type enum value internally, as opposed to external input // which should be validated with nice error message. - abort(); + assert(false); } } diff --git a/src/nix/develop.cc b/src/nix/develop.cc index 037987313..289e3bed3 100644 --- a/src/nix/develop.cc +++ b/src/nix/develop.cc @@ -135,13 +135,7 @@ StorePath getDerivationEnvironment(ref store, const StorePath & drvPath) drv.inputSrcs.insert(std::move(getEnvShPath)); Hash h = hashDerivationModulo(*store, drv, true); auto shellOutPath = store->makeOutputPath("out", h, drvName); - drv.outputs.insert_or_assign("out", DerivationOutput { - .path = shellOutPath, - .hash = FixedOutputHash { - .method = FileIngestionMethod::Flat, - .hash = Hash { }, - }, - }); + drv.outputs.insert_or_assign("out", DerivationOutput { .path = shellOutPath }); drv.env["out"] = store->printStorePath(shellOutPath); auto shellDrvPath2 = writeDerivation(store, drv, drvName);