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 {
560
560
}
561
561
562
562
impl InstallToDiskOpts {
563
- pub ( crate ) fn validate ( & self ) {
563
+ pub ( crate ) fn validate ( & self ) -> Result < ( ) > {
564
564
if !self . composefs_native {
565
565
// Reject using --boot without --composefs
566
566
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" ) ;
568
568
}
569
569
}
570
+
571
+ Ok ( ( ) )
570
572
}
571
573
}
572
574
@@ -1724,7 +1726,7 @@ fn installation_complete() {
1724
1726
#[ context( "Installing to disk" ) ]
1725
1727
#[ cfg( feature = "install-to-disk" ) ]
1726
1728
pub ( crate ) async fn install_to_disk ( mut opts : InstallToDiskOpts ) -> Result < ( ) > {
1727
- opts. validate ( ) ;
1729
+ opts. validate ( ) ? ;
1728
1730
1729
1731
let mut block_opts = opts. block_opts ;
1730
1732
let target_blockdev_meta = block_opts
You can’t perform that action at this time.
0 commit comments