Skip to content

Commit eb75a2b

Browse files
authored
Merge pull request #675 from ckyrouac/pre-fetch-prep
deploy: Return Deployment from deploy function
2 parents 9d3abf2 + 98b2903 commit eb75a2b

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

lib/src/deploy.rs

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -328,20 +328,21 @@ async fn deploy(
328328
image: &ImageState,
329329
origin: &glib::KeyFile,
330330
opts: Option<ostree::SysrootDeployTreeOpts<'_>>,
331-
) -> Result<()> {
331+
) -> Result<Deployment> {
332332
let stateroot = Some(stateroot);
333333
let opts = opts.unwrap_or_default();
334334
// Copy to move into thread
335335
let cancellable = gio::Cancellable::NONE;
336-
let _new_deployment = sysroot.stage_tree_with_options(
337-
stateroot,
338-
image.ostree_commit.as_str(),
339-
Some(origin),
340-
merge_deployment,
341-
&opts,
342-
cancellable,
343-
)?;
344-
Ok(())
336+
return sysroot
337+
.stage_tree_with_options(
338+
stateroot,
339+
image.ostree_commit.as_str(),
340+
Some(origin),
341+
merge_deployment,
342+
&opts,
343+
cancellable,
344+
)
345+
.map_err(Into::into);
345346
}
346347

347348
#[context("Generating origin")]

0 commit comments

Comments
 (0)