From f0860767f53480a0f8105b087962ac72979715c4 Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Sun, 2 Sep 2018 15:32:08 -0700 Subject: [PATCH] zfs: include stderr of command in ZFSError.Error() Since we don't implement screen-scraping of ZFS output ATM, this is better than nothing, as user's may be able to figure out what' sthe problem from the logs / status reports. --- zfs/zfs.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zfs/zfs.go b/zfs/zfs.go index 5040567..577449e 100644 --- a/zfs/zfs.go +++ b/zfs/zfs.go @@ -136,7 +136,7 @@ type ZFSError struct { } func (e ZFSError) Error() string { - return fmt.Sprintf("zfs exited with error: %s", e.WaitErr.Error()) + return fmt.Sprintf("zfs exited with error: %s\nstderr:\n%s", e.WaitErr.Error(), e.Stderr) } var ZFS_BINARY string = "zfs"