Skip to content

Commit

Permalink
incusd/storage/zfs: Fix version handling
Browse files Browse the repository at this point in the history
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
  • Loading branch information
stgraber committed Aug 25, 2023
1 parent a9697f9 commit 3b0b402
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion incusd/storage/drivers/driver_zfs_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ func (d *zfs) version() (string, error) {
// This function is only really ever relevant on Ubuntu as the only
// distro that ships out of sync tools and kernel modules
out, err := shared.RunCommand("dpkg-query", "--showformat=${Version}", "--show", "zfsutils-linux")
if err == nil {
if out != "" && err == nil {
return strings.TrimSpace(string(out)), nil
}

Expand Down

0 comments on commit 3b0b402

Please sign in to comment.