aboutsummaryrefslogtreecommitdiff
path: root/src/libcmd/command.cc
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2021-02-12 17:33:28 +0000
committerJohn Ericson <John.Ericson@Obsidian.Systems>2021-02-12 17:48:09 +0000
commitad337c8697099ac9deb6e0ac16ea91d8acc51e4f (patch)
tree7d886e3c8bcab0926ec08cfb2a49fffc5fab8f7e /src/libcmd/command.cc
parent4e98f0345c144b9d85bed1f6b0bc509bf7ddc000 (diff)
Deeper `Command` hierarchy to remove redundancy
Simply put, we now have `StorePathCommand : public StorePathsCommand` so `StorePathCommand` doesn't reimplement work.
Diffstat (limited to 'src/libcmd/command.cc')
-rw-r--r--src/libcmd/command.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libcmd/command.cc b/src/libcmd/command.cc
index efdc98d5a..d29954f67 100644
--- a/src/libcmd/command.cc
+++ b/src/libcmd/command.cc
@@ -118,10 +118,8 @@ void StorePathsCommand::run(ref<Store> store, std::vector<RealisedPath> paths)
run(store, std::move(storePaths));
}
-void StorePathCommand::run(ref<Store> store)
+void StorePathCommand::run(ref<Store> store, std::vector<StorePath> storePaths)
{
- auto storePaths = toStorePaths(store, Realise::Nothing, operateOn, installables);
-
if (storePaths.size() != 1)
throw UsageError("this command requires exactly one store path");