Skip to content

Commit a354379

Browse files
committed
fix: pipefail handling for missing variables
1 parent a3d559f commit a354379

File tree

1 file changed

+1
-1
lines changed
  • ansible/files/admin_api_scripts/pg_upgrade_scripts

1 file changed

+1
-1
lines changed

ansible/files/admin_api_scripts/pg_upgrade_scripts/initiate.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ function initiate_upgrade {
363363
fi
364364

365365
# Fallback to lsblk if ebsnvme-id is not available or no mapping found, pre ubuntu 20.04
366-
if [ -z "$BLOCK_DEVICE" ]; then
366+
if [ -z "${BLOCK_DEVICE:-}" ]; then
367367
echo "No block device found using ebsnvme-id, falling back to lsblk"
368368
# awk NF==3 prints lines with exactly 3 fields, which are the block devices currently not mounted anywhere
369369
# excluding nvme0 since it is the root disk

0 commit comments

Comments
 (0)