mirror of
https://github.com/actions/setup-python.git
synced 2025-04-19 19:33:29 +00:00
Merge 35853705fb
into 6ed2c67c8a
This commit is contained in:
commit
8c70772580
9
dist/setup/index.js
vendored
9
dist/setup/index.js
vendored
@ -97729,7 +97729,14 @@ function run() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
core.warning('The `python-version` input is not set. The version of Python currently in `PATH` will be used.');
|
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.');
|
||||||
|
}
|
||||||
|
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')}`);
|
||||||
|
@ -146,9 +146,17 @@ async function run() {
|
|||||||
await cacheDependencies(cache, pythonVersion);
|
await cacheDependencies(cache, pythonVersion);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
core.warning(
|
const trueValue = ['true', 'True', 'TRUE'];
|
||||||
'The `python-version` input is not set. The version of Python currently in `PATH` will be used.'
|
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.'
|
||||||
|
);
|
||||||
|
} 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')}`);
|
||||||
|
Loading…
Reference in New Issue
Block a user