summary refs log tree commit diff
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-02-10 15:28:47 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-02-10 15:28:47 +0000
commit9e51abc7dc13ece2a561cdd41c0304cffbba67d4 (patch)
tree3eb35e6a76324ac32760345e69ba83e78d602857
parentf848a457391488544abc6b405d33ab5334eb19d0 (diff)
downloadguix-9e51abc7dc13ece2a561cdd41c0304cffbba67d4.tar.gz
* Make --parse-only work when *not* reading from stdin.
-rw-r--r--src/nix-instantiate/main.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nix-instantiate/main.cc b/src/nix-instantiate/main.cc
index b3a8e68705..75d03f329b 100644
--- a/src/nix-instantiate/main.cc
+++ b/src/nix-instantiate/main.cc
@@ -100,8 +100,10 @@ void run(Strings args)
     for (Strings::iterator i = files.begin();
          i != files.end(); i++)
     {
-        Expr e = evalFile(state, absPath(*i));
-        /* !!! parseOnly ignored */
+        Path path = absPath(*i);
+        Expr e = parseOnly
+            ? parseExprFromFile(state, path)
+            : evalFile(state, path);
         printResult(state, e, evalOnly);
     }