Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Arthur Baars <aibaars@github.com>
  • Loading branch information
2 people authored and GitHub committed Oct 8, 2020
1 parent e97bdbd commit 424a9cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions python-setup/auto_install_packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def _check_output(command):

def install_packages_with_poetry():
if sys.platform.startswith('win32'):
os.environ['POETRY_VIRTUALENVS_PATH'] = os.environ['RUNNER_WORKSPACE'] + '\\virtualenvs'
os.environ['POETRY_VIRTUALENVS_PATH'] = os.path.join(os.environ['RUNNER_WORKSPACE', 'virtualenvs')
try:
_check_call(['poetry', 'install', '--no-root'])
except subprocess.CalledProcessError:
Expand All @@ -45,7 +45,7 @@ def install_packages_with_poetry():

def install_packages_with_pipenv():
if sys.platform.startswith('win32'):
os.environ['WORKON_HOME'] = os.environ['RUNNER_WORKSPACE'] + '\\virtualenvs'
os.environ['WORKON_HOME'] = os.path.join(os.environ['RUNNER_WORKSPACE'], 'virtualenvs')
try:
_check_call(['pipenv', 'install', '--keep-outdated', '--ignore-pipfile'])
except subprocess.CalledProcessError:
Expand All @@ -61,8 +61,8 @@ def install_packages_with_pipenv():

def _create_venv(version: int):
# create temporary directory ... that just lives "forever"
venv_path = os.environ['RUNNER_WORKSPACE']+'/codeql-action-python-autoinstall'
print ("Creating venv in "+venv_path, flush = True)
venv_path = os.path.join(os.environ['RUNNER_WORKSPACE'], 'codeql-action-python-autoinstall')
print ("Creating venv in " + venv_path, flush = True)

# virtualenv is a bit nicer for setting up virtual environment, since it will provide
# up-to-date versions of pip/setuptools/wheel which basic `python3 -m venv venv` won't
Expand Down
2 changes: 1 addition & 1 deletion src/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export async function installPythonDeps(codeql: CodeQL, logger: Logger) {

if (process.platform === "darwin") {
logger.info(
"Currently, auto-installing python dependancies is not supported on MacOS"
"Currently, auto-installing python dependencies is not supported on MacOS"
);
logger.endGroup();
return;
Expand Down

0 comments on commit 424a9cf

Please sign in to comment.