Skip to content

Commit 310f9f5

Browse files
authored
Merge pull request #1581 from jeckersb/cfs-no-storage
cfs: only get sysroot storage when repo is not supplied
2 parents 6a06085 + 6bc63a1 commit 310f9f5

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

crates/lib/src/cfsctl.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ fn verity_opt(opt: &Option<String>) -> Result<Option<Sha512HashValue>> {
151151
Ok(opt.as_ref().map(FsVerityHashValue::from_hex).transpose()?)
152152
}
153153

154-
pub(crate) async fn run_from_iter<I>(system_store: &crate::store::Storage, args: I) -> Result<()>
154+
pub(crate) async fn run_from_iter<I>(args: I) -> Result<()>
155155
where
156156
I: IntoIterator,
157157
I::Item: Into<OsString> + Clone,
@@ -172,6 +172,7 @@ where
172172
if args.insecure {
173173
anyhow::bail!("Cannot override insecure state for system repo");
174174
}
175+
let system_store = crate::cli::get_storage().await?;
175176
system_store.get_ensure_composefs()?
176177
};
177178
let repo = &repo;

crates/lib/src/cli.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1429,10 +1429,7 @@ async fn run_from_opt(opt: Opt) -> Result<()> {
14291429
Ok(())
14301430
}
14311431
},
1432-
InternalsOpts::Cfs { args } => {
1433-
let sysroot = &get_storage().await?;
1434-
crate::cfsctl::run_from_iter(sysroot, args.iter()).await
1435-
}
1432+
InternalsOpts::Cfs { args } => crate::cfsctl::run_from_iter(args.iter()).await,
14361433
InternalsOpts::Reboot => crate::reboot::reboot(),
14371434
InternalsOpts::Fsck => {
14381435
let sysroot = &get_storage().await?;

0 commit comments

Comments
 (0)