File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -1018,8 +1018,9 @@ pub(crate) async fn install_to_disk(mut opts: InstallToDiskOpts) -> Result<()> {
10181018 . with_context ( || format ! ( "Querying {}" , & block_opts. device) ) ?;
10191019 if opts. via_loopback {
10201020 if !opts. config_opts . generic_image {
1021- eprintln ! ( "Automatically enabling --generic-image when installing via loopback" ) ;
1022- std:: thread:: sleep ( std:: time:: Duration :: from_secs ( 2 ) ) ;
1021+ crate :: utils:: medium_visibility_warning (
1022+ "Automatically enabling --generic-image when installing via loopback" ,
1023+ ) ;
10231024 opts. config_opts . generic_image = true ;
10241025 }
10251026 if !target_blockdev_meta. file_type ( ) . is_file ( ) {
Original file line number Diff line number Diff line change @@ -299,8 +299,6 @@ pub(crate) async fn status(opts: super::cli::StatusOpts) -> Result<()> {
299299 host
300300 } ;
301301
302- crate :: utils:: warning ( "note: The format of this API is not yet stable" ) ;
303-
304302 // If we're in JSON mode, then convert the ostree data into Rust-native
305303 // structures that can be serialized.
306304 // Filter to just the serializable status structures.
Original file line number Diff line number Diff line change @@ -67,13 +67,16 @@ pub(crate) fn sigpolicy_from_opts(
6767 }
6868}
6969
70- /// Output a warning message
71- pub ( crate ) fn warning ( s : & str ) {
70+ /// Output a warning message that we want to be quite visible.
71+ /// The process (thread) execution will be delayed for a short time.
72+ pub ( crate ) fn medium_visibility_warning ( s : & str ) {
7273 anstream:: eprintln!(
7374 "{}{s}{}" ,
7475 anstyle:: AnsiColor :: Red . render_fg( ) ,
7576 anstyle:: Reset . render( )
7677 ) ;
78+ // When warning, add a sleep to ensure it's seen
79+ std:: thread:: sleep ( std:: time:: Duration :: from_secs ( 1 ) ) ;
7780}
7881
7982/// Given a possibly tagged image like quay.io/foo/bar:latest and a digest 0ab32..., return
You can’t perform that action at this time.
0 commit comments