mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-27 14:45:13 +08:00
Silence zpool errors
This can print "internal error: failed to initialize ZFS library" on NetBSD. Let's just silence it.
This commit is contained in:
parent
bd5610349d
commit
7425d85729
@ -2,9 +2,9 @@ function __fish_is_zfs_feature_enabled -a feature target -d "Returns 0 if the gi
|
|||||||
set -l pool (string replace -r '/.*' '' -- $target)
|
set -l pool (string replace -r '/.*' '' -- $target)
|
||||||
set -l feature_name ""
|
set -l feature_name ""
|
||||||
if test -z "$pool"
|
if test -z "$pool"
|
||||||
set feature_name (zpool get -H all | string match -r "\s$feature\s")
|
set feature_name (zpool get -H all 2>/dev/null | string match -r "\s$feature\s")
|
||||||
else
|
else
|
||||||
set feature_name (zpool get -H all $pool | string match -r "$pool\s$feature\s")
|
set feature_name (zpool get -H all $pool 2>/dev/null | string match -r "$pool\s$feature\s")
|
||||||
end
|
end
|
||||||
if test $status -ne 0 # No such feature
|
if test $status -ne 0 # No such feature
|
||||||
return 1
|
return 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user