From 332ac5051cdf6ba14ad4720759a31245cecafeb3 Mon Sep 17 00:00:00 2001 From: Zhaofeng Li Date: Sat, 14 Jan 2023 23:55:10 -0700 Subject: [PATCH] client/get_closure: Add --include-outputs --- client/src/command/get_closure.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/src/command/get_closure.rs b/client/src/command/get_closure.rs index 2efce91..8fb5fe4 100644 --- a/client/src/command/get_closure.rs +++ b/client/src/command/get_closure.rs @@ -12,6 +12,10 @@ use attic::nix_store::NixStore; #[derive(Debug, Parser)] pub struct GetClosure { store_path: PathBuf, + + /// For derivations, include their outputs. + #[clap(long)] + include_outputs: bool, } pub async fn run(opts: Opts) -> Result<()> { @@ -20,7 +24,7 @@ pub async fn run(opts: Opts) -> Result<()> { let store = NixStore::connect()?; let store_path = store.follow_store_path(&sub.store_path)?; let closure = store - .compute_fs_closure(store_path, false, false, false) + .compute_fs_closure(store_path, false, sub.include_outputs, false) .await?; for path in &closure {