diff --git a/zfs-prune-snapshots b/zfs-prune-snapshots index 1b582e0..2d29e41 100755 --- a/zfs-prune-snapshots +++ b/zfs-prune-snapshots @@ -165,11 +165,6 @@ human-size() { echo '0 B' } -if ! command -v zfs &>/dev/null; then - echo "Error! zfs command not found. Are you on the right machine?" >&2 - exit 1 -fi - recursive=false dryrun=false listonly=false @@ -240,6 +235,11 @@ if ! now=$(get-epoch); then exit 1 fi +if ! command -v zfs &>/dev/null; then + echo "Error! zfs command not found. Are you on the right machine?" >&2 + exit 1 +fi + # first pass of the pools (to calculate totals and filter unwanted datasets lines=() while read -r line; do