diff options
author | Dominik Ritter <dritter03@googlemail.com> | 2019-01-24 01:52:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-24 01:52:37 +0300 |
commit | 6ccdfdf37e47f67683c016426cac89c6a3ac9fb0 (patch) | |
tree | d6bb0c0212ea5e001a03aaf9c5f697ac5646107a /functions | |
parent | 081000c49e3792a9d2877344650011a7b38a30c3 (diff) | |
parent | 938b0d49a13c2d69181595234e9eda4d72049396 (diff) |
Merge pull request #981 from pgierz/os_release_fix
[Bugfix] Fix for #974
Diffstat (limited to 'functions')
-rwxr-xr-x | functions/utilities.zsh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/functions/utilities.zsh b/functions/utilities.zsh index 127007fb..95f89d99 100755 --- a/functions/utilities.zsh +++ b/functions/utilities.zsh @@ -102,7 +102,9 @@ case $(uname) in ;; Linux) OS='Linux' - os_release_id="$(grep -E '^ID=([a-zA-Z]*)' /etc/os-release | cut -d '=' -f 2)" + if [ -f /etc/os-release ]; then + [[ ${(f)"$((</etc/os-release) 2>/dev/null)"} =~ "ID=([A-Za-z]+)" ]] && os_release_id="${match[1]}" + fi case "$os_release_id" in *arch*) OS_ICON=$(print_icon 'LINUX_ARCH_ICON') |