diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/license/finder/ext/pipenv.rb | 2 | ||||
| -rw-r--r-- | lib/license/management/python.rb | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/license/finder/ext/pipenv.rb b/lib/license/finder/ext/pipenv.rb index 9736393..075ddd9 100644 --- a/lib/license/finder/ext/pipenv.rb +++ b/lib/license/finder/ext/pipenv.rb @@ -5,7 +5,7 @@ module LicenseFinder def prepare return unless pipfile? - shell.execute([:pipenv, '--python', python.major_version]) + shell.execute([:pipenv, '--python', python.version]) shell.execute([:pipenv, :run, :pipenv, :sync, '--pypi-mirror', python.pip_index_url]) end diff --git a/lib/license/management/python.rb b/lib/license/management/python.rb index 37771ba..8a1a81a 100644 --- a/lib/license/management/python.rb +++ b/lib/license/management/python.rb @@ -14,7 +14,10 @@ module License end def version - ENV.fetch('LM_PYTHON_VERSION', '3') + ENV.fetch('ASDF_PYTHON_VERSION') do + _stdout, stderr, status = shell.execute([:python, '--version']) + status.success? ? stderr.split(' ')[-1] : 3 + end end def pip_index_url |
