fix per suggestion

This commit is contained in:
Zhang Boyu 2019-10-20 00:19:10 +08:00 committed by GitHub
parent 2c3faf9469
commit 480b62edec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 3 deletions

View File

@ -1210,10 +1210,11 @@ get_kernel() {
return return
} }
# In Windows 'uname -r' under MSYS returns version of MSYS, so use wmic # In Windows 'uname' may return the info of GNUenv thus use wmic for OS kernel
[[ "$os" == Windows ]] && { [[ "$os" == Windows ]] && {
kernel_version=$(wmic os get Version) kernel=$(wmic os get Version)
kernel_version="${kernel_version/Version}" kernel="${kernel/Version}"
return
} }
case "$kernel_shorthand" in case "$kernel_shorthand" in