aboutsummaryrefslogtreecommitdiff
path: root/src/nix-build/nix-build.cc
diff options
context:
space:
mode:
authorCarlo Nucera <carlo.nucera@protonmail.com>2020-07-31 13:12:51 -0400
committerCarlo Nucera <carlo.nucera@protonmail.com>2020-07-31 13:12:51 -0400
commitb6d97fdbf4f668d72e93e94e956a19ddb299bcd2 (patch)
tree56cfa7cf92b3684d24f7f0c3ed7c4637e54b499f /src/nix-build/nix-build.cc
parent2c7557481b4c9d5113a65cc7a75c8acc18031f4e (diff)
parenta3f9625818ecb0c8a3c22c191340dac5a3120bb5 (diff)
Merge branch 'master' of github.com:NixOS/nix into drv-outputs-map-allow-missing
Diffstat (limited to 'src/nix-build/nix-build.cc')
-rwxr-xr-xsrc/nix-build/nix-build.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nix-build/nix-build.cc b/src/nix-build/nix-build.cc
index f77de56ea..94412042f 100755
--- a/src/nix-build/nix-build.cc
+++ b/src/nix-build/nix-build.cc
@@ -174,7 +174,7 @@ static void _main(int argc, char * * argv)
else if (*arg == "--run-env") // obsolete
runEnv = true;
- else if (*arg == "--command" || *arg == "--run") {
+ else if (runEnv && (*arg == "--command" || *arg == "--run")) {
if (*arg == "--run")
interactive = false;
envCommand = getArg(*arg, arg, end) + "\nexit";
@@ -192,7 +192,7 @@ static void _main(int argc, char * * argv)
else if (*arg == "--pure") pure = true;
else if (*arg == "--impure") pure = false;
- else if (*arg == "--packages" || *arg == "-p")
+ else if (runEnv && (*arg == "--packages" || *arg == "-p"))
packages = true;
else if (inShebang && *arg == "-i") {
@@ -325,7 +325,7 @@ static void _main(int argc, char * * argv)
auto buildPaths = [&](const std::vector<StorePathWithOutputs> & paths) {
/* Note: we do this even when !printMissing to efficiently
fetch binary cache data. */
- unsigned long long downloadSize, narSize;
+ uint64_t downloadSize, narSize;
StorePathSet willBuild, willSubstitute, unknown;
store->queryMissing(paths,
willBuild, willSubstitute, unknown, downloadSize, narSize);