mirror of
https://github.com/actions/setup-python
synced 2025-04-06 23:39:42 +00:00
Add check-latest functionality (#406)
This commit is contained in:
@ -80,6 +80,8 @@ async function run() {
|
||||
);
|
||||
try {
|
||||
const version = resolveVersionInput();
|
||||
const checkLatest = core.getBooleanInput('check-latest');
|
||||
|
||||
if (version) {
|
||||
let pythonVersion: string;
|
||||
const arch: string = core.getInput('architecture') || os.arch();
|
||||
@ -88,7 +90,8 @@ async function run() {
|
||||
const installed = await finderPyPy.findPyPyVersion(
|
||||
version,
|
||||
arch,
|
||||
updateEnvironment
|
||||
updateEnvironment,
|
||||
checkLatest
|
||||
);
|
||||
pythonVersion = `${installed.resolvedPyPyVersion}-${installed.resolvedPythonVersion}`;
|
||||
core.info(
|
||||
@ -98,7 +101,8 @@ async function run() {
|
||||
const installed = await finder.useCpythonVersion(
|
||||
version,
|
||||
arch,
|
||||
updateEnvironment
|
||||
updateEnvironment,
|
||||
checkLatest
|
||||
);
|
||||
pythonVersion = installed.version;
|
||||
core.info(`Successfully set up ${installed.impl} (${pythonVersion})`);
|
||||
|
Reference in New Issue
Block a user