From f7b650d234dffd72b2c70ee25d9e333d433feba6 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 28 Aug 2012 11:47:26 -0400 Subject: [PATCH] Make "nix-instantiate -" interruptible --- src/nix-instantiate/nix-instantiate.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/nix-instantiate/nix-instantiate.cc b/src/nix-instantiate/nix-instantiate.cc index beb7fa024..6ddf9f069 100644 --- a/src/nix-instantiate/nix-instantiate.cc +++ b/src/nix-instantiate/nix-instantiate.cc @@ -26,9 +26,7 @@ void printHelp() static Expr * parseStdin(EvalState & state) { startNest(nest, lvlTalkative, format("parsing standard input")); - string s, s2; - while (getline(std::cin, s2)) s += s2 + "\n"; - return state.parseExprFromString(s, absPath(".")); + return state.parseExprFromString(drainFD(0), absPath(".")); }