Skip to content

Commit e858305

Browse files
committed
Fix unbound variable when using custom OFED repo
1 parent aa690bd commit e858305

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

elements/mlnx-ofed/environment.d/mlnx-ofed

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
#!/bin/bash
22

3-
if [ -n "$DIB_MLNX_OFED_REPO_FILE" ]; then
4-
export MLNX_OFED_REPO_FILE=${DIB_MLNX_OFED_REPO_FILE}
5-
else
3+
export MLNX_OFED_REPO_FILE=${DIB_MLNX_OFED_REPO_FILE:-}
4+
if [ -z "$MLNX_OFED_REPO_FILE" ]; then
65
export MLNX_OFED_REPO=${DIB_MLNX_OFED_REPO:?"A repo URL for Mellanox OFED packages is required"}
76
export MLNX_OFED_VERSION=${DIB_MLNX_OFED_VERSION:?"A revision of OFED is required"}
87
fi

0 commit comments

Comments
 (0)