File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -30,11 +30,12 @@ async function checkVersion (ctx) {
3030 const { statusCode, body : data } = await rp ( {
3131 url : `${ VERSION_CHECK_ENDPOINT } ?v=${ config . version } ` ,
3232 method : 'GET' ,
33- json : true
33+ json : true ,
34+ timeout : 3000
3435 } )
3536
3637 if ( statusCode !== 200 || data . status === 'error' ) {
37- logger . error ( 'Version check failed.' )
38+ logger . warn ( 'Version check failed.' )
3839 return
3940 }
4041
@@ -46,12 +47,12 @@ async function checkVersion (ctx) {
4647 if ( ! data . latest ) {
4748 const { version, link } = data . versionItem
4849
49- logger . warn ( `Your CodiMD version is out of date! The latest version is ${ version } . Please see what's new on ${ link } .` )
50+ logger . info ( `Your CodiMD version is out of date! The latest version is ${ version } . Please see what's new on ${ link } .` )
5051 }
5152 } catch ( err ) {
5253 // ignore and skip version check
53- logger . error ( 'Version check failed.' )
54- logger . error ( err )
54+ logger . warn ( 'Version check failed.' )
55+ logger . warn ( err )
5556 }
5657}
5758
You can’t perform that action at this time.
0 commit comments