mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 05:56:15 +02:00
nix-instantiate --eval-only --read-write-mode: Don't depend on ordering
Signed-off-by: Shea Levy <shea@shealevy.com>
This commit is contained in:
parent
e4058fab64
commit
84a8b5e9af
1 changed files with 8 additions and 9 deletions
|
@ -97,23 +97,19 @@ void run(Strings args)
|
|||
bool strict = false;
|
||||
Strings attrPaths;
|
||||
Bindings autoArgs;
|
||||
bool wantsReadWrite = false;
|
||||
|
||||
for (Strings::iterator i = args.begin(); i != args.end(); ) {
|
||||
string arg = *i++;
|
||||
|
||||
if (arg == "-")
|
||||
readStdin = true;
|
||||
else if (arg == "--eval-only") {
|
||||
settings.readOnlyMode = true;
|
||||
else if (arg == "--eval-only")
|
||||
evalOnly = true;
|
||||
}
|
||||
else if (arg == "--read-write-mode") {
|
||||
settings.readOnlyMode = false;
|
||||
}
|
||||
else if (arg == "--parse-only") {
|
||||
settings.readOnlyMode = true;
|
||||
else if (arg == "--read-write-mode")
|
||||
wantsReadWrite = true;
|
||||
else if (arg == "--parse-only")
|
||||
parseOnly = evalOnly = true;
|
||||
}
|
||||
else if (arg == "--find-file")
|
||||
findFile = true;
|
||||
else if (arg == "--attr" || arg == "-A") {
|
||||
|
@ -146,6 +142,9 @@ void run(Strings args)
|
|||
files.push_back(arg);
|
||||
}
|
||||
|
||||
if (evalOnly && !wantsReadWrite)
|
||||
settings.readOnlyMode = true;
|
||||
|
||||
if (attrPaths.empty()) attrPaths.push_back("");
|
||||
|
||||
if (findFile) {
|
||||
|
|
Loading…
Reference in a new issue