mirror of
https://github.com/dylanaraps/neofetch.git
synced 2025-12-17 17:37:11 +00:00
Disk: If df fails, abort
This commit is contained in:
2
neofetch
2
neofetch
@@ -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; }
|
type -p df >/dev/null 2>&1 || { err "Disk requires 'df' to function. Install 'df' to get disk info."; return; }
|
||||||
|
|
||||||
# Get the info for /
|
# Get the info for /
|
||||||
disks=($(df -h /))
|
disks=($(df -h /)) || { err "Disk: 'df' exited with error code 1"; return; }
|
||||||
|
|
||||||
# Split the info
|
# Split the info
|
||||||
disk_used="${disks[9]}"
|
disk_used="${disks[9]}"
|
||||||
|
|||||||
Reference in New Issue
Block a user