diff options
Diffstat (limited to 'src/nix/command.cc')
-rw-r--r-- | src/nix/command.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nix/command.cc b/src/nix/command.cc index a45f2888bfb5..3c82e0df57f7 100644 --- a/src/nix/command.cc +++ b/src/nix/command.cc @@ -129,4 +129,14 @@ void StorePathsCommand::run(ref<Store> store) run(store, storePaths); } +void StorePathCommand::run(ref<Store> store) +{ + auto storePaths = buildInstallables(store, false); + + if (storePaths.size() != 1) + throw UsageError("this command requires exactly one store path"); + + run(store, *storePaths.begin()); +} + } |