From 480b62edec8ed6cf189994d4e5ac82403bd7021a Mon Sep 17 00:00:00 2001 From: Zhang Boyu <34395339+Zhboyu-BUAA@users.noreply.github.com> Date: Sun, 20 Oct 2019 00:19:10 +0800 Subject: [PATCH] fix per suggestion --- neofetch | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/neofetch b/neofetch index eecc1469..c26dc98f 100755 --- a/neofetch +++ b/neofetch @@ -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