pfetch: Fix WSL. Closes #57
This commit is contained in:
parent
e74081fa46
commit
1713dc68a1
8
pfetch
8
pfetch
|
@ -195,8 +195,8 @@ get_os() {
|
|||
#
|
||||
# If the kernel version string ends in "-Microsoft",
|
||||
# we're very likely running under Windows 10 in WSL1.
|
||||
[ "${kernel%%*-Microsoft}" ] ||
|
||||
distro="$distro on Windows 10 [WSL1]"
|
||||
if [ "$WSLENV" ]; then
|
||||
distro="${distro}${WSLENV+ on Windows 10 [WSL2]}"
|
||||
|
||||
# Check to see if Linux is running in Windows 10 under
|
||||
# WSL2 (Windows subsystem for Linux [version 2]) and
|
||||
|
@ -205,7 +205,9 @@ get_os() {
|
|||
# This checks to see if '$WSLENV' is defined. This
|
||||
# appends the Windows 10 string even if '$WSLENV' is
|
||||
# empty. We only need to check that is has been _exported_.
|
||||
distro="${distro}${WSLENV+ on Windows 10 [WSL2]}"
|
||||
elif [ -z "${kernel%%*-Microsoft}" ]; then
|
||||
distro="$distro on Windows 10 [WSL1]"
|
||||
fi
|
||||
;;
|
||||
|
||||
Darwin*)
|
||||
|
|
Loading…
Reference in New Issue
Block a user