Disk: If df fails, abort

This commit is contained in:
Dylan Araps 2016-12-16 23:14:20 +11:00
parent 49a9694827
commit d738ad6f82

View file

@ -1540,7 +1540,7 @@ get_disk() {
type -p df >/dev/null 2>&1 || { err "Disk requires 'df' to function. Install 'df' to get disk info."; return; }
# Get the info for /
disks=($(df -h /))
disks=($(df -h /)) || { err "Disk: 'df' exited with error code 1"; return; }
# Split the info
disk_used="${disks[9]}"