Code Review
/
releng
/
global-jjb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Feat: Choose best python version to run venv
[releng/global-jjb.git]
/
shell
/
capture-instance-metadata.sh
diff --git
a/shell/capture-instance-metadata.sh
b/shell/capture-instance-metadata.sh
index
57a4e8d
..
172ed10
100644
(file)
--- a/
shell/capture-instance-metadata.sh
+++ b/
shell/capture-instance-metadata.sh
@@
-14,7
+14,13
@@
echo "---> capture-instance-metadata.sh"
# shellcheck disable=SC1090
source ~/lf-env.sh
# shellcheck disable=SC1090
source ~/lf-env.sh
-lf-activate-venv python3.8 lftools
+if [[ "${PYTHON:-}" -ne "" ]]; then
+ lf-activate-venv --python $PYTHON lftools
+elif python3; then
+ lf-activate-venv --python python3 lftools
+else
+ lf-activate-venv lftools
+fi
# detect if we're in EC2
if [ -n "${NOMAD_DC}" ]; then
# detect if we're in EC2
if [ -n "${NOMAD_DC}" ]; then