From 40dfac968a87c1d90b5b3c9e3ffe72a370165047 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 16 Jan 2017 22:06:05 +0100 Subject: [PATCH] nix-build: Use showManPage() and printVersion() --- src/nix-build/nix-build.cc | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc index 71ef5af86..2bb12c9b2 100755 --- a/src/nix-build/nix-build.cc +++ b/src/nix-build/nix-build.cc @@ -136,15 +136,11 @@ int main(int argc, char ** argv) if (arg == "--help") { deletePath(tmpDir); - tmpDir.cancel(); - execlp("man", "man", myName, NULL); - throw SysError("executing man"); + showManPage(myName); } - else if (arg == "--version") { - std::cout << myName << " (Nix) " << nixVersion << '\n'; - return; - } + else if (arg == "--version") + printVersion(myName); else if (arg == "--add-drv-link") { drvLink = "./derivation";