mirror of
https://github.com/NixOS/nix.git
synced 2024-10-30 13:50:51 +00:00
nix-build.cc: Refactor: extract sourcePath, resolvedPath variables
This commit is contained in:
parent
e9479b272f
commit
76245ffbeb
@ -315,11 +315,11 @@ static void main_nix_build(int argc, char * * argv)
|
||||
relative to the script. */
|
||||
auto baseDir = inShebang && !packages ? absPath(i, absPath(dirOf(script))) : i;
|
||||
|
||||
exprs.push_back(
|
||||
state->parseExprFromFile(
|
||||
resolveExprPath(
|
||||
lookupFileArg(*state,
|
||||
baseDir))));
|
||||
auto sourcePath = lookupFileArg(*state,
|
||||
baseDir);
|
||||
auto resolvedPath = resolveExprPath(sourcePath);
|
||||
|
||||
exprs.push_back(state->parseExprFromFile(resolvedPath));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user