mirror of
https://github.com/actions/setup-python.git
synced 2025-04-24 15:32:13 +00:00
fix comments
This commit is contained in:
parent
0021e2d68e
commit
0572342a8a
4 changed files with 20 additions and 19 deletions
22
dist/setup/index.js
vendored
22
dist/setup/index.js
vendored
|
@ -64578,6 +64578,7 @@ const path = __importStar(__nccwpck_require__(1017));
|
|||
const exec = __importStar(__nccwpck_require__(1514));
|
||||
const core = __importStar(__nccwpck_require__(2186));
|
||||
const cache_distributor_1 = __importDefault(__nccwpck_require__(8953));
|
||||
const utils_1 = __nccwpck_require__(1314);
|
||||
class PoetryCache extends cache_distributor_1.default {
|
||||
constructor(pythonVersion, patterns = '**/poetry.lock') {
|
||||
super('poetry', patterns);
|
||||
|
@ -64598,11 +64599,11 @@ class PoetryCache extends cache_distributor_1.default {
|
|||
core.debug(`pythonLocation is ${pythonLocation}`);
|
||||
const { exitCode, stderr } = yield exec.getExecOutput(`poetry env use ${pythonLocation}`, undefined, { ignoreReturnCode: true });
|
||||
if (exitCode) {
|
||||
core.info(`[warning]${stderr}`);
|
||||
utils_1.logWarning(stderr);
|
||||
}
|
||||
}
|
||||
else {
|
||||
core.info('[warning]python binaries were not found in PATH.');
|
||||
utils_1.logWarning('python binaries were not found in PATH');
|
||||
}
|
||||
return paths;
|
||||
});
|
||||
|
@ -65254,7 +65255,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.logWarning = void 0;
|
||||
const core = __importStar(__nccwpck_require__(2186));
|
||||
const finder = __importStar(__nccwpck_require__(9996));
|
||||
const finderPyPy = __importStar(__nccwpck_require__(4003));
|
||||
|
@ -65290,14 +65290,14 @@ function resolveVersionInput() {
|
|||
core.info(`Resolved ${versionFile} as ${version}`);
|
||||
return version;
|
||||
}
|
||||
logWarning("Neither 'python-version' nor 'python-version-file' inputs were supplied. Attempting to find '.python-version' file.");
|
||||
utils_1.logWarning("Neither 'python-version' nor 'python-version-file' inputs were supplied. Attempting to find '.python-version' file.");
|
||||
versionFile = '.python-version';
|
||||
if (fs_1.default.existsSync(versionFile)) {
|
||||
version = fs_1.default.readFileSync(versionFile, 'utf8');
|
||||
core.info(`Resolved ${versionFile} as ${version}`);
|
||||
return version;
|
||||
}
|
||||
logWarning(`${versionFile} doesn't exist.`);
|
||||
utils_1.logWarning(`${versionFile} doesn't exist.`);
|
||||
return version;
|
||||
}
|
||||
function run() {
|
||||
|
@ -65345,11 +65345,6 @@ function run() {
|
|||
}
|
||||
});
|
||||
}
|
||||
function logWarning(message) {
|
||||
const warningPrefix = '[warning]';
|
||||
core.info(`${warningPrefix}${message}`);
|
||||
}
|
||||
exports.logWarning = logWarning;
|
||||
run();
|
||||
|
||||
|
||||
|
@ -65392,7 +65387,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.getLinuxOSReleaseInfo = exports.isCacheFeatureAvailable = exports.isGhes = exports.validatePythonVersionFormatForPyPy = exports.writeExactPyPyVersionFile = exports.readExactPyPyVersionFile = exports.getPyPyVersionFromPath = exports.isNightlyKeyword = exports.validateVersion = exports.createSymlinkInFolder = exports.WINDOWS_PLATFORMS = exports.WINDOWS_ARCHS = exports.IS_LINUX = exports.IS_WINDOWS = void 0;
|
||||
exports.logWarning = exports.getLinuxOSReleaseInfo = exports.isCacheFeatureAvailable = exports.isGhes = exports.validatePythonVersionFormatForPyPy = exports.writeExactPyPyVersionFile = exports.readExactPyPyVersionFile = exports.getPyPyVersionFromPath = exports.isNightlyKeyword = exports.validateVersion = exports.createSymlinkInFolder = exports.WINDOWS_PLATFORMS = exports.WINDOWS_ARCHS = exports.IS_LINUX = exports.IS_WINDOWS = void 0;
|
||||
const cache = __importStar(__nccwpck_require__(7799));
|
||||
const core = __importStar(__nccwpck_require__(2186));
|
||||
const fs_1 = __importDefault(__nccwpck_require__(7147));
|
||||
|
@ -65493,6 +65488,11 @@ function getLinuxOSReleaseInfo() {
|
|||
});
|
||||
}
|
||||
exports.getLinuxOSReleaseInfo = getLinuxOSReleaseInfo;
|
||||
function logWarning(message) {
|
||||
const warningPrefix = '[warning]';
|
||||
core.info(`${warningPrefix}${message}`);
|
||||
}
|
||||
exports.logWarning = logWarning;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
|
|
@ -5,6 +5,7 @@ import * as exec from '@actions/exec';
|
|||
import * as core from '@actions/core';
|
||||
|
||||
import CacheDistributor from './cache-distributor';
|
||||
import { logWarning } from '../utils';
|
||||
|
||||
class PoetryCache extends CacheDistributor {
|
||||
constructor(
|
||||
|
@ -43,10 +44,10 @@ class PoetryCache extends CacheDistributor {
|
|||
);
|
||||
|
||||
if (exitCode) {
|
||||
core.info(`[warning]${stderr}`);
|
||||
logWarning(stderr);
|
||||
}
|
||||
} else {
|
||||
core.info('[warning]python binaries were not found in PATH.');
|
||||
logWarning('python binaries were not found in PATH');
|
||||
}
|
||||
|
||||
return paths;
|
||||
|
|
|
@ -5,7 +5,7 @@ import * as path from 'path';
|
|||
import * as os from 'os';
|
||||
import fs from 'fs';
|
||||
import {getCacheDistributor} from './cache-distributions/cache-factory';
|
||||
import {isCacheFeatureAvailable, IS_LINUX, IS_WINDOWS} from './utils';
|
||||
import {isCacheFeatureAvailable, logWarning, IS_LINUX, IS_WINDOWS} from './utils';
|
||||
|
||||
function isPyPyVersion(versionSpec: string) {
|
||||
return versionSpec.startsWith('pypy');
|
||||
|
@ -115,9 +115,4 @@ async function run() {
|
|||
}
|
||||
}
|
||||
|
||||
export function logWarning(message: string): void {
|
||||
const warningPrefix = '[warning]';
|
||||
core.info(`${warningPrefix}${message}`);
|
||||
}
|
||||
|
||||
run();
|
||||
|
|
|
@ -136,3 +136,8 @@ export async function getLinuxOSReleaseInfo() {
|
|||
|
||||
return `${osVersion}-${osRelease}`;
|
||||
}
|
||||
|
||||
export function logWarning(message: string): void {
|
||||
const warningPrefix = '[warning]';
|
||||
core.info(`${warningPrefix}${message}`);
|
||||
}
|
Loading…
Add table
Reference in a new issue