diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-08-28T15·47-0400 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-08-28T15·47-0400 |
commit | f7b650d234dffd72b2c70ee25d9e333d433feba6 (patch) | |
tree | 134389785d2428d8b74ccc32db8c40d5cd1d8140 /src/nix-instantiate | |
parent | 15e1b2c223494ecb5efefc3ea0e3b926a6b1d7dc (diff) |
Make "nix-instantiate -" interruptible
Diffstat (limited to 'src/nix-instantiate')
-rw-r--r-- | src/nix-instantiate/nix-instantiate.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/nix-instantiate/nix-instantiate.cc b/src/nix-instantiate/nix-instantiate.cc index beb7fa024959..6ddf9f069ef3 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(".")); } |