diff options
Diffstat (limited to 'src/nix-instantiate')
-rw-r--r-- | src/nix-instantiate/nix-instantiate.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/nix-instantiate/nix-instantiate.cc b/src/nix-instantiate/nix-instantiate.cc index 0c4dc06e87f7..86bb1841b9a0 100644 --- a/src/nix-instantiate/nix-instantiate.cc +++ b/src/nix-instantiate/nix-instantiate.cc @@ -71,9 +71,13 @@ void processExpr(EvalState & state, const Strings & attrPaths, bool parseOnly, bool strict, const ATermMap & autoArgs, bool evalOnly, bool xmlOutput, Expr e) { - Value v; - state.strictEval(e, v); - std::cout << v << std::endl; + if (parseOnly) + std::cout << format("%1%\n") % canonicaliseExpr(e); + else { + Value v; + state.strictEval(e, v); + std::cout << v << std::endl; + } #if 0 for (Strings::const_iterator i = attrPaths.begin(); i != attrPaths.end(); ++i) { |