Skip to content

Commit 582a433

Browse files
authored
Merge pull request #4080 from Flamefire/skip_empty_python
skip over unset $EB_PYTHON/$EB_INSTALLPYTHON
2 parents 562ba5e + 46b613b commit 582a433

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.github/workflows/eb_command.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ jobs:
7777
echo "Looking for pattern \"${pattern}\" in eb_version.out..."
7878
grep "$pattern" eb_version.out
7979
done
80+
if grep -q "Considering ''" eb_version.out; then
81+
echo '`eb` did wrongly consider an empty command'
82+
false
83+
fi
8084
# also check when specifying Python command via $EB_PYTHON
8185
for eb_python in "python${pymajver}" "python${pymajminver}"; do
8286
export EB_PYTHON="${eb_python}"

eb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ PYTHON=
6262
# time, this variable preserves that choice).
6363
for python_cmd in "${EB_PYTHON}" "${EB_INSTALLPYTHON}" 'python' 'python3' 'python2'; do
6464

65+
# Only consider non-empty values, i.e. continue if e.g. $EB_PYTHON is not set
66+
[ -n "${python_cmd}" ] || continue
67+
6568
verbose "Considering '${python_cmd}'..."
6669

6770
# check whether python* command being considered is available

0 commit comments

Comments
 (0)