aboutsummaryrefslogtreecommitdiff
path: root/src/nix-copy-closure
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-06-28 18:11:01 +0200
committerEelco Dolstra <edolstra@gmail.com>2017-07-03 11:38:08 +0200
commitfcca702a96a8ca0e73f6d035052c30121776aeba (patch)
tree73f85b723f0cac6054a7c7e89ffa040b7b890456 /src/nix-copy-closure
parent90da34e421607ad6c40f3dea08709ae89db7a7e1 (diff)
Replace a few bool flags with enums
Functions like copyClosure() had 3 bool arguments, which creates a severe risk of mixing up arguments. Also, implement copyClosure() using copyPaths().
Diffstat (limited to 'src/nix-copy-closure')
-rwxr-xr-xsrc/nix-copy-closure/nix-copy-closure.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nix-copy-closure/nix-copy-closure.cc b/src/nix-copy-closure/nix-copy-closure.cc
index dc324abcb..0c69bd413 100755
--- a/src/nix-copy-closure/nix-copy-closure.cc
+++ b/src/nix-copy-closure/nix-copy-closure.cc
@@ -12,7 +12,7 @@ int main(int argc, char ** argv)
auto toMode = true;
auto includeOutputs = false;
auto dryRun = false;
- auto useSubstitutes = false;
+ auto useSubstitutes = NoSubstitute;
std::string sshHost;
PathSet storePaths;
@@ -36,7 +36,7 @@ int main(int argc, char ** argv)
else if (*arg == "--dry-run")
dryRun = true;
else if (*arg == "--use-substitutes" || *arg == "-s")
- useSubstitutes = true;
+ useSubstitutes = Substitute;
else if (sshHost.empty())
sshHost = *arg;
else
@@ -58,6 +58,6 @@ int main(int argc, char ** argv)
PathSet closure;
from->computeFSClosure(storePaths2, closure, false, includeOutputs);
- copyPaths(from, to, closure, useSubstitutes, true);
+ copyPaths(from, to, closure, NoRepair, NoCheckSigs, useSubstitutes);
});
}