From a010c0ae0545babccb054f8f726b864b7cff0dcb Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 13 May 2015 18:03:22 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20"error:=20deriver=20of=20path=20=E2=80=98?= =?UTF-8?q?=E2=80=99=20is=20not=20known"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/nix-store/nix-store.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc index 60080f253..506c1a397 100644 --- a/src/nix-store/nix-store.cc +++ b/src/nix-store/nix-store.cc @@ -49,12 +49,11 @@ LocalStore & ensureLocalStore() static Path useDeriver(Path path) { - if (!isDerivation(path)) { - path = store->queryDeriver(path); - if (path == "") - throw Error(format("deriver of path ‘%1%’ is not known") % path); - } - return path; + if (isDerivation(path)) return path; + Path drvPath = store->queryDeriver(path); + if (drvPath == "") + throw Error(format("deriver of path ‘%1%’ is not known") % path); + return drvPath; }