Merge pull request #17877 from jhoblitt/ci/fix-find-block-dev-broken-pipe
ci: fix broken-pipe race in find_extra_block_dev
This commit is contained in:
1 file changed
+3
-1
@@ -83,7 +83,9 @@ function create_extra_disk() {
|
||||
# iSCSI disk if none exist. Thin wrapper over find_extra_block_devs(); kept as a
|
||||
# convenience for its many callers that expect a single basename.
|
||||
function find_extra_block_dev() {
|
||||
find_extra_block_devs 1 | head -1
|
||||
local devs
|
||||
mapfile -t devs < <(find_extra_block_devs 1)
|
||||
echo "${devs[0]}" # the first disk
|
||||
}
|
||||
|
||||
# find_extra_block_devs [min_count]
|
||||
|
||||
Reference in new issue
Block a user