Merge pull request #17 from zcake3000/main

fix uwufetch break on some distro (e.g. : debian)
This commit is contained in:
TheDarkBug 2021-03-07 17:05:07 +01:00 committed by GitHub
commit c9c0543caf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -114,7 +114,7 @@ void get_info() { // get all necessary info
memmove(&shell[0], &shell[5], 16); memmove(&shell[0], &shell[5], 16);
// os version // os version
FILE *fos_rel = popen("cat /etc/os-release | grep ID= | cut -d '=' -f2 2> /dev/null", "r"); FILE *fos_rel = popen("cat /etc/os-release | awk '/^ID=/' | awk -F '=' '{print $2}' 2> /dev/null", "r");
fscanf(fos_rel,"%[^\n]", version_name); fscanf(fos_rel,"%[^\n]", version_name);
fclose(fos_rel); fclose(fos_rel);