This commit is contained in:
Kazuhiro Masuda 2025-04-18 18:25:51 +09:00 committed by GitHub
commit 8c70772580
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 19 additions and 4 deletions

7
dist/setup/index.js vendored
View File

@ -97729,8 +97729,15 @@ function run() {
} }
} }
else { else {
const trueValue = ['true', 'True', 'TRUE'];
const pythonVersionRequired = process.env['PYTHON_VERSION_REQUIRED'] || '';
if (!trueValue.includes(pythonVersionRequired)) {
core.warning('The `python-version` input is not set. The version of Python currently in `PATH` will be used.'); core.warning('The `python-version` input is not set. The version of Python currently in `PATH` will be used.');
} }
else {
throw new Error(`The python-version input is required.`);
}
}
const matchersPath = path.join(__dirname, '../..', '.github'); const matchersPath = path.join(__dirname, '../..', '.github');
core.info(`##[add-matcher]${path.join(matchersPath, 'python.json')}`); core.info(`##[add-matcher]${path.join(matchersPath, 'python.json')}`);
} }

View File

@ -146,9 +146,17 @@ async function run() {
await cacheDependencies(cache, pythonVersion); await cacheDependencies(cache, pythonVersion);
} }
} else { } else {
const trueValue = ['true', 'True', 'TRUE'];
const pythonVersionRequired = process.env['PYTHON_VERSION_REQUIRED'] || '';
if(!trueValue.includes(pythonVersionRequired)) {
core.warning( core.warning(
'The `python-version` input is not set. The version of Python currently in `PATH` will be used.' 'The `python-version` input is not set. The version of Python currently in `PATH` will be used.'
); );
} else {
throw new Error(
`The python-version input is required.`
);
}
} }
const matchersPath = path.join(__dirname, '../..', '.github'); const matchersPath = path.join(__dirname, '../..', '.github');
core.info(`##[add-matcher]${path.join(matchersPath, 'python.json')}`); core.info(`##[add-matcher]${path.join(matchersPath, 'python.json')}`);