diff --git a/README.md b/README.md index a412222..ab7f174 100644 --- a/README.md +++ b/README.md @@ -16,4 +16,4 @@ abbiefetch will attempt to gather as much information as possible on systems tha | `freebsd` | FreeBSD | | 1.1.0 | Full | | | `haiku` | Haiku | | 1.1.0 | Limited | | | `windows` | Microsoft Windows | | 1.2.0 | Full | Relies on wmic.exe and systeminfo.exe | -| `windows/cygwin` | Microsoft Windows | Cygwin | 1.2.0 | Full | Relies on wmic.exe and systeminfo.exe | +| `windows/cygwin` | Microsoft Windows | Cygwin | 1.2.0 | Partial | Relies on wmic.exe and systeminfo.exe, issues with machine detection | diff --git a/distro_machine_detection.7 b/distro_machine_detection.7 index 2b3345b..28e3602 100644 --- a/distro_machine_detection.7 +++ b/distro_machine_detection.7 @@ -72,5 +72,9 @@ if [ "$system_type" = "windows" ] && [ -z "$machine"] && [ "$hassed" -eq 1 ]; th if [ "$hasawk" -eq 1 ]; then distro="$(systeminfo.exe 2>/dev/null | grep -v "BIOS" | grep "OS Version" | awk -F ":" '{print $2}' | tr -s " ")" fi - machine="$(wmic.exe computersystem get Manufacturer | sed -n 2p | head -n 1 | tr -s " ")$(wmic.exe computersystem get Model | sed -n 2p | head -n 1)" + if [ "$subtype" = "cygwin" ]; then + machine=0 + else + machine="$(wmic.exe computersystem get Manufacturer | sed -n 2p | head -n 1 | tr -s " ")$(wmic.exe computersystem get Model | sed -n 2p | head -n 1)" + fi fi