mirror of
https://github.com/actions/setup-python.git
synced 2025-02-22 23:00:30 +07:00
Improve error message when trying to use free threaded Python versions before 3.13
This commit is contained in:
parent
197140633c
commit
0681a6bff7
12
dist/setup/index.js
vendored
12
dist/setup/index.js
vendored
@ -91073,12 +91073,16 @@ function useCpythonVersion(version, architecture, updateEnvironment, checkLatest
|
|||||||
}
|
}
|
||||||
if (!installDir) {
|
if (!installDir) {
|
||||||
const osInfo = yield (0, utils_1.getOSInfo)();
|
const osInfo = yield (0, utils_1.getOSInfo)();
|
||||||
throw new Error([
|
const msg = [
|
||||||
`The version '${version}' with architecture '${architecture}' was not found for ${osInfo
|
`The version '${version}' with architecture '${architecture}' was not found for ${osInfo
|
||||||
? `${osInfo.osName} ${osInfo.osVersion}`
|
? `${osInfo.osName} ${osInfo.osVersion}`
|
||||||
: 'this operating system'}.`,
|
: 'this operating system'}.`
|
||||||
`The list of all available versions can be found here: ${installer.MANIFEST_URL}`
|
];
|
||||||
].join(os.EOL));
|
if (freethreaded) {
|
||||||
|
msg.push(`Free threaded versions are only available for Python 3.13.0 and later.`);
|
||||||
|
}
|
||||||
|
msg.push(`The list of all available versions can be found here: ${installer.MANIFEST_URL}`);
|
||||||
|
throw new Error(msg.join(os.EOL));
|
||||||
}
|
}
|
||||||
const _binDir = binDir(installDir);
|
const _binDir = binDir(installDir);
|
||||||
const binaryExtension = utils_1.IS_WINDOWS ? '.exe' : '';
|
const binaryExtension = utils_1.IS_WINDOWS ? '.exe' : '';
|
||||||
|
@ -102,16 +102,22 @@ export async function useCpythonVersion(
|
|||||||
|
|
||||||
if (!installDir) {
|
if (!installDir) {
|
||||||
const osInfo = await getOSInfo();
|
const osInfo = await getOSInfo();
|
||||||
throw new Error(
|
const msg = [
|
||||||
[
|
`The version '${version}' with architecture '${architecture}' was not found for ${
|
||||||
`The version '${version}' with architecture '${architecture}' was not found for ${
|
osInfo
|
||||||
osInfo
|
? `${osInfo.osName} ${osInfo.osVersion}`
|
||||||
? `${osInfo.osName} ${osInfo.osVersion}`
|
: 'this operating system'
|
||||||
: 'this operating system'
|
}.`
|
||||||
}.`,
|
];
|
||||||
`The list of all available versions can be found here: ${installer.MANIFEST_URL}`
|
if (freethreaded) {
|
||||||
].join(os.EOL)
|
msg.push(
|
||||||
|
`Free threaded versions are only available for Python 3.13.0 and later.`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
msg.push(
|
||||||
|
`The list of all available versions can be found here: ${installer.MANIFEST_URL}`
|
||||||
);
|
);
|
||||||
|
throw new Error(msg.join(os.EOL));
|
||||||
}
|
}
|
||||||
|
|
||||||
const _binDir = binDir(installDir);
|
const _binDir = binDir(installDir);
|
||||||
|
Loading…
Reference in New Issue
Block a user