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