aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2012-04-17 17:19:43 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-04-17 17:19:43 +0200
commit9cd3ff1059e9daffe65e24dc826268f1e69e2593 (patch)
tree00fe9e7c4c79dab32261f8d5f637f0392a6443e8 /src
parent8745fade0387b2900a98b95798d9f12be7ef97ca (diff)
nix-instantiate: default to "default.nix" if no arguments are given
Diffstat (limited to 'src')
-rw-r--r--src/nix-instantiate/nix-instantiate.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nix-instantiate/nix-instantiate.cc b/src/nix-instantiate/nix-instantiate.cc
index adc8ca623..d86c9fc84 100644
--- a/src/nix-instantiate/nix-instantiate.cc
+++ b/src/nix-instantiate/nix-instantiate.cc
@@ -148,7 +148,8 @@ void run(Strings args)
Expr * e = parseStdin(state);
processExpr(state, attrPaths, parseOnly, strict, autoArgs,
evalOnly, xmlOutput, xmlOutputSourceLocation, e);
- }
+ } else if (files.empty())
+ files.push_back("./default.nix");
foreach (Strings::iterator, i, files) {
Expr * e = state.parseExprFromFile(lookupFileArg(state, *i));