Skip to content

Commit cebd899

Browse files
committed
multipath: work around false shellcheck error
Shellcheck seems to think that [ -z "$debug" ] is setting the debug variable and warns: common/multipath-over-rdma:190:11: note: Modification of debug is local (to subshell caused by pipeline). [SC2030] common/multipath-over-rdma:606:8: note: debug was modified in a subshell. That change might be lost. [SC2031] Work around this by using test instead. Signed-off-by: Omar Sandoval <[email protected]>
1 parent 6722375 commit cebd899

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

common/multipath-over-rdma

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ remove_stale_mpath_devs() {
187187
echo -n "removing $mpdev: "
188188
if ! remove_mpath_dev "$mpdev"; then
189189
echo "failed"
190-
[ -z "$debug" ] || return 1
190+
test -z "$debug" || return 1
191191
fi
192192
done
193193
echo "Finished examining multipaths"

0 commit comments

Comments
 (0)