Disk: Exit the function if the user doesn't have df installed

This commit is contained in:
Dylan Araps 2016-12-10 19:22:26 +11:00
parent d784fb8370
commit 7bd6eda49d
2 changed files with 2 additions and 0 deletions

0
%1 Normal file
View File

View File

@ -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")