@@ -27,7 +27,7 @@ pub fn print(config: &Config, meta: StorageMetadata) {
2727 let scheme = config. parseable . get_scheme ( ) ;
2828 status_info ( config, & scheme, meta. deployment_id ) ;
2929 storage_info ( config) ;
30- about:: print ( meta) ;
30+ about:: print ( config , meta) ;
3131 println ! ( ) ;
3232}
3333
@@ -95,6 +95,7 @@ pub mod about {
9595 use crossterm:: style:: Stylize ;
9696 use std:: fmt;
9797
98+ use crate :: option:: Config ;
9899 use crate :: storage:: StorageMetadata ;
99100 use crate :: utils:: update;
100101
@@ -114,8 +115,8 @@ pub mod about {
114115
115116 pub fn print_about (
116117 current_version : semver:: Version ,
118+ latest_release : Option < update:: LatestRelease > ,
117119 commit_hash : String ,
118- meta : StorageMetadata ,
119120 ) {
120121 eprint ! (
121122 "
@@ -125,7 +126,7 @@ pub mod about {
125126 current_version,
126127 ) ;
127128
128- if let Ok ( latest_release) = update :: get_latest ( meta ) {
129+ if let Some ( latest_release) = latest_release {
129130 if latest_release. version > current_version {
130131 print_latest_release ( latest_release) ;
131132 }
@@ -149,13 +150,18 @@ pub mod about {
149150 eprint ! ( "{}" , fmt_latest_version. red( ) ) ;
150151 }
151152
152- pub fn print ( meta : StorageMetadata ) {
153+ pub fn print ( config : & Config , meta : StorageMetadata ) {
153154 // print current version
154155 let current = current ( ) ;
156+ let latest_release = if config. parseable . check_update {
157+ update:: get_latest ( & meta) . ok ( )
158+ } else {
159+ None
160+ } ;
155161
156162 match current. 0 {
157163 ParseableVersion :: Version ( current_version) => {
158- print_about ( current_version, current. 1 , meta ) ;
164+ print_about ( current_version, latest_release , current. 1 ) ;
159165 }
160166 ParseableVersion :: Prerelease ( current_prerelease) => {
161167 eprintln ! (
0 commit comments