1
0
Fork 0
mirror of https://github.com/actions/setup-python.git synced 2024-11-22 06:26:25 +00:00

Fix path of extracted folder for Python (#118)

* fixed path for pythonExtractedFolder

* build on node v12

* updated index.js

* removed fileName variable

Co-authored-by: Nikita Bykov <v-nibyko@microsoft.com>
This commit is contained in:
Nikita Bykov 2020-07-20 19:29:05 +03:00 committed by GitHub
parent 7010ec794f
commit 0c28554988
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4902 additions and 4899 deletions

9796
dist/index.js vendored

File diff suppressed because it is too large Load diff

View file

@ -58,13 +58,12 @@ export async function installCpythonFromRelease(release: tc.IToolRelease) {
core.info(`Download from "${downloadUrl}"`);
const pythonPath = await tc.downloadTool(downloadUrl, undefined, AUTH);
const fileName = path.basename(pythonPath, '.zip');
core.info('Extract downloaded archive');
let pythonExtractedFolder;
if (IS_WINDOWS) {
pythonExtractedFolder = await tc.extractZip(pythonPath, `./${fileName}`);
pythonExtractedFolder = await tc.extractZip(pythonPath);
} else {
pythonExtractedFolder = await tc.extractTar(pythonPath, `./${fileName}`);
pythonExtractedFolder = await tc.extractTar(pythonPath);
}
core.info('Execute installation script');