mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 22:16:16 +02:00
Don’t use FileIngestionMethod for StorePathsCommand
This is a different recursive than used in makeFixedOutputPath.
This commit is contained in:
parent
b90241ceb1
commit
7873fd175d
3 changed files with 8 additions and 8 deletions
|
@ -31,21 +31,21 @@ void StoreCommand::run()
|
||||||
run(getStore());
|
run(getStore());
|
||||||
}
|
}
|
||||||
|
|
||||||
StorePathsCommand::StorePathsCommand(FileIngestionMethod recursive)
|
StorePathsCommand::StorePathsCommand(bool recursive)
|
||||||
: recursive(recursive)
|
: recursive(recursive)
|
||||||
{
|
{
|
||||||
if (recursive == FileIngestionMethod::Recursive)
|
if (recursive)
|
||||||
addFlag({
|
addFlag({
|
||||||
.longName = "no-recursive",
|
.longName = "no-recursive",
|
||||||
.description = "apply operation to specified paths only",
|
.description = "apply operation to specified paths only",
|
||||||
.handler = {&this->recursive, FileIngestionMethod::Flat},
|
.handler = {&this->recursive, false},
|
||||||
});
|
});
|
||||||
else
|
else
|
||||||
addFlag({
|
addFlag({
|
||||||
.longName = "recursive",
|
.longName = "recursive",
|
||||||
.shortName = 'r',
|
.shortName = 'r',
|
||||||
.description = "apply operation to closure of the specified paths",
|
.description = "apply operation to closure of the specified paths",
|
||||||
.handler = {&this->recursive, FileIngestionMethod::Recursive},
|
.handler = {&this->recursive, true},
|
||||||
});
|
});
|
||||||
|
|
||||||
mkFlag(0, "all", "apply operation to the entire store", &all);
|
mkFlag(0, "all", "apply operation to the entire store", &all);
|
||||||
|
@ -66,7 +66,7 @@ void StorePathsCommand::run(ref<Store> store)
|
||||||
for (auto & p : toStorePaths(store, realiseMode, installables))
|
for (auto & p : toStorePaths(store, realiseMode, installables))
|
||||||
storePaths.push_back(p.clone());
|
storePaths.push_back(p.clone());
|
||||||
|
|
||||||
if (recursive == FileIngestionMethod::Recursive) {
|
if (recursive) {
|
||||||
StorePathSet closure;
|
StorePathSet closure;
|
||||||
store->computeFSClosure(storePathsToSet(storePaths), closure, false, false);
|
store->computeFSClosure(storePathsToSet(storePaths), closure, false, false);
|
||||||
storePaths.clear();
|
storePaths.clear();
|
||||||
|
|
|
@ -92,7 +92,7 @@ struct StorePathsCommand : public InstallablesCommand
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
|
|
||||||
FileIngestionMethod recursive = FileIngestionMethod::Flat;
|
bool recursive = false;
|
||||||
bool all = false;
|
bool all = false;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@ -101,7 +101,7 @@ protected:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
StorePathsCommand(FileIngestionMethod recursive = FileIngestionMethod::Flat);
|
StorePathsCommand(bool recursive = false);
|
||||||
|
|
||||||
using StoreCommand::run;
|
using StoreCommand::run;
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ struct CmdCopy : StorePathsCommand
|
||||||
SubstituteFlag substitute = NoSubstitute;
|
SubstituteFlag substitute = NoSubstitute;
|
||||||
|
|
||||||
CmdCopy()
|
CmdCopy()
|
||||||
: StorePathsCommand(FileIngestionMethod::Recursive)
|
: StorePathsCommand(true)
|
||||||
{
|
{
|
||||||
addFlag({
|
addFlag({
|
||||||
.longName = "from",
|
.longName = "from",
|
||||||
|
|
Loading…
Reference in a new issue