File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
crates/system-reinstall-bootc/src Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -51,10 +51,12 @@ impl ReinstallOptsArgs {
5151 os_release:: get_bootc_image_from_file ( ETC_OS_RELEASE )
5252 . ok ( )
5353 . flatten ( )
54+ . filter ( |s| !s. is_empty ( ) )
5455 . or_else ( || {
5556 os_release:: get_bootc_image_from_file ( USR_LIB_OS_RELEASE )
5657 . ok ( )
5758 . flatten ( )
59+ . filter ( |s| !s. is_empty ( ) )
5860 } )
5961 . ok_or_else ( || {
6062 anyhow:: anyhow!(
@@ -72,6 +74,8 @@ impl ReinstallOptsArgs {
7274
7375#[ context( "run" ) ]
7476fn run ( ) -> Result < ( ) > {
77+ let args = ReinstallOptsArgs :: parse ( ) ;
78+
7579 // We historically supported an environment variable providing a config to override the image, so
7680 // keep supporting that. I'm considering deprecating that though.
7781 let opts = if let Some ( config) = config:: ReinstallConfig :: load ( ) . context ( "loading config" ) ? {
@@ -81,7 +85,7 @@ fn run() -> Result<()> {
8185 }
8286 } else {
8387 // Otherwise an image is specified via the CLI or fallback to the os-release
84- ReinstallOptsArgs :: parse ( ) . build ( ) ?
88+ args . build ( ) ?
8589 } ;
8690
8791 bootc_utils:: initialize_tracing ( ) ;
You can’t perform that action at this time.
0 commit comments