about summary refs log tree commit diff
path: root/src/nix-instantiate/nix-instantiate.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix-instantiate/nix-instantiate.cc')
-rw-r--r--src/nix-instantiate/nix-instantiate.cc11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/nix-instantiate/nix-instantiate.cc b/src/nix-instantiate/nix-instantiate.cc
index a5d12c1466f7..49a14cb64458 100644
--- a/src/nix-instantiate/nix-instantiate.cc
+++ b/src/nix-instantiate/nix-instantiate.cc
@@ -17,13 +17,6 @@
 using namespace nix;
 
 
-static Expr * parseStdin(EvalState & state)
-{
-    //Activity act(*logger, lvlTalkative, format("parsing standard input"));
-    return state.parseExprFromString(drainFD(0), absPath("."));
-}
-
-
 static Path gcRoot;
 static int rootNr = 0;
 static bool indirectRoot = false;
@@ -166,7 +159,7 @@ int main(int argc, char * * argv)
 
         Bindings & autoArgs(*evalAutoArgs(state, autoArgs_));
 
-        if (attrPaths.empty()) attrPaths.push_back("");
+        if (attrPaths.empty()) attrPaths = {""};
 
         if (findFile) {
             for (auto & i : files) {
@@ -178,7 +171,7 @@ int main(int argc, char * * argv)
         }
 
         if (readStdin) {
-            Expr * e = parseStdin(state);
+            Expr * e = state.parseStdin();
             processExpr(state, attrPaths, parseOnly, strict, autoArgs,
                 evalOnly, outputKind, xmlOutputSourceLocation, e);
         } else if (files.empty() && !fromArgs)