Disk: Exit the function if the user doesn't have df installed
This commit is contained in:
parent
d784fb8370
commit
7bd6eda49d
2
neofetch
2
neofetch
|
@ -1594,6 +1594,8 @@ get_term_font() {
|
||||||
}
|
}
|
||||||
|
|
||||||
get_disk() {
|
get_disk() {
|
||||||
|
type -p df >/dev/null 2>&1 || { err "Disk requires 'df' to function. Install 'df' to get disk info."; return; }
|
||||||
|
|
||||||
# df flags
|
# df flags
|
||||||
case "$os" in
|
case "$os" in
|
||||||
"Linux" | "iPhone OS" | "Windows" | "Solaris" | "GNU")
|
"Linux" | "iPhone OS" | "Windows" | "Solaris" | "GNU")
|
||||||
|
|
Reference in New Issue