File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -560,13 +560,15 @@ impl FromStr for MountSpec {
560560}
561561
562562impl InstallToDiskOpts {
563- pub ( crate ) fn validate ( & self ) {
563+ pub ( crate ) fn validate ( & self ) -> Result < ( ) > {
564564 if !self . composefs_native {
565565 // Reject using --boot without --composefs
566566 if self . composefs_opts . boot != BootType :: default ( ) {
567- panic ! ( "--boot must not be provided without --composefs" ) ;
567+ anyhow :: bail !( "--boot must not be provided without --composefs" ) ;
568568 }
569569 }
570+
571+ Ok ( ( ) )
570572 }
571573}
572574
@@ -1717,7 +1719,7 @@ fn installation_complete() {
17171719#[ context( "Installing to disk" ) ]
17181720#[ cfg( feature = "install-to-disk" ) ]
17191721pub ( crate ) async fn install_to_disk ( mut opts : InstallToDiskOpts ) -> Result < ( ) > {
1720- opts. validate ( ) ;
1722+ opts. validate ( ) ? ;
17211723
17221724 let mut block_opts = opts. block_opts ;
17231725 let target_blockdev_meta = block_opts
You can’t perform that action at this time.
0 commit comments