aboutsummaryrefslogtreecommitdiff
path: root/src/nix/command.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix/command.cc')
-rw-r--r--src/nix/command.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/nix/command.cc b/src/nix/command.cc
index 442bc6c53..fce6c391c 100644
--- a/src/nix/command.cc
+++ b/src/nix/command.cc
@@ -28,20 +28,20 @@ void StoreCommand::run()
run(getStore());
}
-StorePathsCommand::StorePathsCommand(bool recursive)
+StorePathsCommand::StorePathsCommand(FileIngestionMethod recursive)
: recursive(recursive)
{
- if (recursive)
+ if (recursive == FileIngestionMethod::Recursive)
mkFlag()
.longName("no-recursive")
.description("apply operation to specified paths only")
- .set(&this->recursive, false);
+ .set(&this->recursive, FileIngestionMethod::Flat);
else
mkFlag()
.longName("recursive")
.shortName('r')
.description("apply operation to closure of the specified paths")
- .set(&this->recursive, true);
+ .set(&this->recursive, FileIngestionMethod::Recursive);
mkFlag(0, "all", "apply operation to the entire store", &all);
}
@@ -61,7 +61,7 @@ void StorePathsCommand::run(ref<Store> store)
for (auto & p : toStorePaths(store, realiseMode, installables))
storePaths.push_back(p.clone());
- if (recursive) {
+ if (recursive == FileIngestionMethod::Recursive) {
StorePathSet closure;
store->computeFSClosure(storePathsToSet(storePaths), closure, false, false);
storePaths.clear();