diff options
| author | mo khan <mo.khan@gmail.com> | 2020-03-06 11:41:13 -0700 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2020-03-06 11:41:13 -0700 |
| commit | b823a7113e4ad754a187eaaf4d6700151e035031 (patch) | |
| tree | 3050b32e1956125f5b06e6847039a6605cea8923 /run.sh | |
| parent | b4abeb395762cd0370aed4f614aa224db5c15f22 (diff) | |
Extract python_version variable
Diffstat (limited to 'run.sh')
| -rwxr-xr-x | run.sh | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -97,7 +97,8 @@ function major_version_from() { echo "$1" | cut -d'.' -f1 } -switch_to python "$(major_version_from "${LM_PYTHON_VERSION:-3}")" +python_version=$(major_version_from "${LM_PYTHON_VERSION:-3}") +switch_to python "$python_version" switch_to java "adopt-openjdk-${LM_JAVA_VERSION:-8}" # shellcheck source=/dev/null @@ -108,5 +109,5 @@ prepare_project "$2" scan_project "$PREPARE" \ --format=json \ --save="${LM_REPORT_FILE}" \ - --python-version="$(major_version_from "$(python --version | awk '{ print $2 }')")" \ + --python-version="${python_version}" \ $LICENSE_FINDER_CLI_OPTS |
