From 7bd6eda49d6ecc344e4fc68053eae09c3545645c Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 10 Dec 2016 19:22:26 +1100 Subject: [PATCH] Disk: Exit the function if the user doesn't have df installed --- %1 | 0 neofetch | 2 ++ 2 files changed, 2 insertions(+) create mode 100644 %1 diff --git a/%1 b/%1 new file mode 100644 index 00000000..e69de29b diff --git a/neofetch b/neofetch index 87503fb8..28117e6a 100755 --- a/neofetch +++ b/neofetch @@ -1594,6 +1594,8 @@ get_term_font() { } get_disk() { + type -p df >/dev/null 2>&1 || { err "Disk requires 'df' to function. Install 'df' to get disk info."; return; } + # df flags case "$os" in "Linux" | "iPhone OS" | "Windows" | "Solaris" | "GNU")