Merge branch 'main' into v-dmshib/add-check-latest

This commit is contained in:
Dmitry Shibanov 2022-05-31 09:51:15 +02:00
commit 86e88a60ab
10 changed files with 85 additions and 5 deletions

View file

@ -106,8 +106,14 @@ export async function useCpythonVersion(
}
}
const _binDir = binDir(installDir);
const binaryExtension = IS_WINDOWS ? '.exe' : '';
const pythonPath = path.join(
IS_WINDOWS ? installDir : _binDir,
`python${binaryExtension}`
);
core.addPath(installDir);
core.addPath(binDir(installDir));
core.addPath(_binDir);
if (IS_WINDOWS) {
// Add --user directory
@ -129,6 +135,7 @@ export async function useCpythonVersion(
const installed = versionFromPath(installDir);
core.setOutput('python-version', installed);
core.setOutput('python-path', pythonPath);
return {impl: 'CPython', version: installed};
}