fix(3p/nix): Fix incorrectly braced conditionals and loops

Fixes mistakes introduced by clang-tidy in the previous commit.
This commit is contained in:
Vincent Ambo 2020-05-19 18:01:12 +01:00
parent b490742a51
commit 09cbc431cc
16 changed files with 62 additions and 61 deletions

View file

@ -163,7 +163,9 @@ static int _main(int argc, char** argv) {
if (findFile) {
for (auto& i : files) {
Path p = state->findFile(i);
if (p == "") throw Error(format("unable to find '%1%'") % i);
if (p == "") {
throw Error(format("unable to find '%1%'") % i);
}
std::cout << p << std::endl;
}
return 0;
@ -173,10 +175,9 @@ static int _main(int argc, char** argv) {
Expr* e = state->parseStdin();
processExpr(*state, attrPaths, parseOnly, strict, autoArgs, evalOnly,
outputKind, xmlOutputSourceLocation, e);
} else {
if
} else if (files.empty() && !fromArgs) {
files.push_back("./default.nix");
}
(files.empty() && !fromArgs) files.push_back("./default.nix");
for (auto& i : files) {
Expr* e = fromArgs