Skip to content

Commit ebe7f63

Browse files
shi2wei3Johan-Liebert1
authored andcommitted
lib/composefs: Add error check for unsupported --download-only flag
The previous commit (c325582) added --download-only support for the OSTree backend but did not add an error check for the composefs backend where this feature is not yet implemented. This commit adds a proper error message at the start of upgrade_composefs() to explicitly bail out when --download-only is used, matching the pattern used for other unsupported composefs features like --mutate-in-place and edit operations. Without this check, the flag would be silently ignored, potentially causing confusion for users expecting download-only behavior. Error message: "--download-only is not yet supported for composefs backend" Signed-off-by: Wei Shi <wshi@redhat.com>
1 parent c325582 commit ebe7f63

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

crates/lib/src/bootc_composefs/update.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,11 @@ pub(crate) async fn upgrade_composefs(
266266
storage: &Storage,
267267
composefs: &BootedComposefs,
268268
) -> Result<()> {
269+
// Download-only mode is not yet supported for composefs backend
270+
if opts.download_only {
271+
anyhow::bail!("--download-only is not yet supported for composefs backend");
272+
}
273+
269274
let host = get_composefs_status(storage, composefs)
270275
.await
271276
.context("Getting composefs deployment status")?;

0 commit comments

Comments
 (0)