mirror of
https://github.com/actions/setup-python.git
synced 2025-04-22 07:09:14 +08:00
add warning
This commit is contained in:
parent
0cf603f701
commit
975ba007b9
3
dist/index.js
vendored
3
dist/index.js
vendored
|
@ -2662,6 +2662,9 @@ function run() {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
try {
|
try {
|
||||||
let version = core.getInput('python-version');
|
let version = core.getInput('python-version');
|
||||||
|
if (version.startsWith('2')) {
|
||||||
|
core.warning('The support for python 2.7 will be removed on June 19. Related issue: https://github.com/actions/setup-python/issues/672');
|
||||||
|
}
|
||||||
if (version) {
|
if (version) {
|
||||||
const arch = core.getInput('architecture', { required: true });
|
const arch = core.getInput('architecture', { required: true });
|
||||||
const installed = yield finder.findPythonVersion(version, arch);
|
const installed = yield finder.findPythonVersion(version, arch);
|
||||||
|
|
|
@ -5,6 +5,11 @@ import * as path from 'path';
|
||||||
async function run() {
|
async function run() {
|
||||||
try {
|
try {
|
||||||
let version = core.getInput('python-version');
|
let version = core.getInput('python-version');
|
||||||
|
if (version.startsWith('2')) {
|
||||||
|
core.warning(
|
||||||
|
'The support for python 2.7 will be removed on June 19. Related issue: https://github.com/actions/setup-python/issues/672'
|
||||||
|
);
|
||||||
|
}
|
||||||
if (version) {
|
if (version) {
|
||||||
const arch: string = core.getInput('architecture', {required: true});
|
const arch: string = core.getInput('architecture', {required: true});
|
||||||
const installed = await finder.findPythonVersion(version, arch);
|
const installed = await finder.findPythonVersion(version, arch);
|
||||||
|
|
Loading…
Reference in a new issue