mirror of
https://code.forgejo.org/actions/setup-python
synced 2025-06-17 16:26:06 +02:00
Fix: Add .zip
extension to Windows package downloads for Expand-Archive
Compatibility (#916)
* Fix: specify filename during Windows package download * Changed unit test download urls
This commit is contained in:
parent
04c1311429
commit
036a523674
5 changed files with 77 additions and 8 deletions
|
@ -4,7 +4,7 @@ import * as tc from '@actions/tool-cache';
|
|||
import * as exec from '@actions/exec';
|
||||
import * as httpm from '@actions/http-client';
|
||||
import {ExecOptions} from '@actions/exec/lib/interfaces';
|
||||
import {IS_WINDOWS, IS_LINUX} from './utils';
|
||||
import {IS_WINDOWS, IS_LINUX, getDownloadFileName} from './utils';
|
||||
|
||||
const TOKEN = core.getInput('token');
|
||||
const AUTH = !TOKEN ? undefined : `token ${TOKEN}`;
|
||||
|
@ -98,7 +98,8 @@ export async function installCpythonFromRelease(release: tc.IToolRelease) {
|
|||
core.info(`Download from "${downloadUrl}"`);
|
||||
let pythonPath = '';
|
||||
try {
|
||||
pythonPath = await tc.downloadTool(downloadUrl, undefined, AUTH);
|
||||
const fileName = getDownloadFileName(downloadUrl);
|
||||
pythonPath = await tc.downloadTool(downloadUrl, fileName, AUTH);
|
||||
core.info('Extract downloaded archive');
|
||||
let pythonExtractedFolder;
|
||||
if (IS_WINDOWS) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue