aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xfunctions/utilities.zsh2
1 files changed, 1 insertions, 1 deletions
diff --git a/functions/utilities.zsh b/functions/utilities.zsh
index cedf5493..95f89d99 100755
--- a/functions/utilities.zsh
+++ b/functions/utilities.zsh
@@ -103,7 +103,7 @@ case $(uname) in
Linux)
OS='Linux'
if [ -f /etc/os-release ]; then
- os_release_id="$(grep -E '^ID=([a-zA-Z]*)' /etc/os-release | cut -d '=' -f 2)"
+ [[ ${(f)"$((</etc/os-release) 2>/dev/null)"} =~ "ID=([A-Za-z]+)" ]] && os_release_id="${match[1]}"
fi
case "$os_release_id" in
*arch*)