diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2017-06-28T16·11+0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2017-07-03T09·38+0200 |
commit | fcca702a96a8ca0e73f6d035052c30121776aeba (patch) | |
tree | 73f85b723f0cac6054a7c7e89ffa040b7b890456 /src/nix-copy-closure/nix-copy-closure.cc | |
parent | 90da34e421607ad6c40f3dea08709ae89db7a7e1 (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/nix-copy-closure.cc')
-rwxr-xr-x | src/nix-copy-closure/nix-copy-closure.cc | 6 |
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 dc324abcb3ba..0c69bd413569 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); }); } |