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

View file

@ -1210,10 +1210,11 @@ get_kernel() {
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 ]] && {
kernel_version=$(wmic os get Version)
kernel_version="${kernel_version/Version}"
kernel=$(wmic os get Version)
kernel="${kernel/Version}"
return
}
case "$kernel_shorthand" in