File tree Expand file tree Collapse file tree 4 files changed +69
-412
lines changed Expand file tree Collapse file tree 4 files changed +69
-412
lines changed Original file line number Diff line number Diff line change 1
1
[submodule "assets "]
2
2
path = assets
3
3
url = https://github.com/hexojs/hexo-starter.git
4
+ branch = master
Original file line number Diff line number Diff line change @@ -13,12 +13,12 @@ async function versionConsole() {
13
13
14
14
console . log ( 'hexo-cli:' , pkg . version ) ;
15
15
16
- let osInfo = '' ;
16
+ let osInfo : string | void | Buffer ;
17
17
if ( platform === 'darwin' ) osInfo = await spawn ( 'sw_vers' , '-productVersion' ) ;
18
18
else if ( platform === 'linux' ) {
19
19
const v = await spawn ( 'cat' , '/etc/os-release' ) ;
20
- const distro = ( v || '' ) . match ( / N A M E = " ( .+ ) " / ) ;
21
- const versionInfo = ( v || '' ) . match ( / V E R S I O N = " ( .+ ) " / ) || [ '' , '' ] ;
20
+ const distro = String ( v || '' ) . match ( / N A M E = " ( .+ ) " / ) ;
21
+ const versionInfo = String ( v || '' ) . match ( / V E R S I O N = " ( .+ ) " / ) || [ '' , '' ] ;
22
22
const versionStr = versionInfo !== null ? versionInfo [ 1 ] : '' ;
23
23
osInfo = `${ distro [ 1 ] } ${ versionStr } ` . trim ( ) || '' ;
24
24
}
You can’t perform that action at this time.
0 commit comments