zfs: replace hard coded zfs command in ZFSDestroy

fixes #231
This commit is contained in:
chenhao 2019-10-16 16:13:51 +08:00 committed by Christian Schwarz
parent b9933f6cb2
commit c396f9508a

View File

@ -220,7 +220,7 @@ var batchDestroyFeatureCheck struct {
func (d destroyerImpl) DestroySnapshotsCommaSyntaxSupported() (bool, error) {
batchDestroyFeatureCheck.once.Do(func() {
// "feature discovery"
cmd := exec.Command("zfs", "destroy")
cmd := exec.Command(ZFS_BINARY, "destroy")
output, err := cmd.CombinedOutput()
if _, ok := err.(*exec.ExitError); !ok {
debug("destroy feature check failed: %T %s", err, err)