Skip to content

Commit 2c3dafc

Browse files
committed
Use sys.executable
1 parent e63596e commit 2c3dafc

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

python-setup/auto_install_packages.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@ def _check_output(command):
2323

2424

2525
def install_packages_with_poetry():
26-
command = ['poetry']
26+
command = [sys.executable, '-m', 'poetry']
2727
if sys.platform.startswith('win32'):
28-
command = ['py', '-3' , '-m', 'poetry']
2928
os.environ['POETRY_VIRTUALENVS_PATH'] = os.path.join(os.environ['RUNNER_WORKSPACE'], 'virtualenvs')
3029
try:
3130
_check_call(command + ['install', '--no-root'])
@@ -46,9 +45,8 @@ def install_packages_with_poetry():
4645

4746

4847
def install_packages_with_pipenv():
49-
command = ['pipenv']
48+
command = [sys.executable, '-m', 'pipenv']
5049
if sys.platform.startswith('win32'):
51-
command = ['py', '-3' , '-m', 'pipenv']
5250
os.environ['WORKON_HOME'] = os.path.join(os.environ['RUNNER_WORKSPACE'], 'virtualenvs')
5351
try:
5452
_check_call(command + ['install', '--keep-outdated', '--ignore-pipfile'])

0 commit comments

Comments
 (0)