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) {
30
30
const { statusCode, body : data } = await rp ( {
31
31
url : `${ VERSION_CHECK_ENDPOINT } ?v=${ config . version } ` ,
32
32
method : 'GET' ,
33
- json : true
33
+ json : true ,
34
+ timeout : 1000
34
35
} )
35
36
36
37
if ( statusCode !== 200 || data . status === 'error' ) {
37
- logger . error ( 'Version check failed.' )
38
+ logger . warn ( 'Version check failed.' )
38
39
return
39
40
}
40
41
@@ -46,12 +47,12 @@ async function checkVersion (ctx) {
46
47
if ( ! data . latest ) {
47
48
const { version, link } = data . versionItem
48
49
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 } .` )
50
51
}
51
52
} catch ( err ) {
52
53
// 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 )
55
56
}
56
57
}
57
58
You can’t perform that action at this time.
0 commit comments