@@ -65241,6 +65241,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
6524165241 return (mod && mod.__esModule) ? mod : { "default": mod };
6524265242};
6524365243Object.defineProperty(exports, "__esModule", ({ value: true }));
65244+ exports.logWarning = void 0;
6524465245const core = __importStar(__nccwpck_require__(2186));
6524565246const finder = __importStar(__nccwpck_require__(9996));
6524665247const finderPyPy = __importStar(__nccwpck_require__(4003));
@@ -65269,24 +65270,20 @@ function resolveVersionInput() {
6526965270 return version;
6527065271 }
6527165272 if (versionFile) {
65272- const defaultVersionFile = '.python-version';
6527365273 if (!fs_1.default.existsSync(versionFile)) {
65274- if (versionFile === defaultVersionFile) {
65275- throw new Error(`The specified python version file at: ${versionFile} does not exist.`);
65276- }
65277- if (fs_1.default.existsSync(defaultVersionFile)) {
65278- core.warning(`The specified python version file at: ${versionFile} does not exist. Attempting to find ${defaultVersionFile} file.`);
65279- versionFile = defaultVersionFile;
65274+ logWarning(`The specified python version file at: ${versionFile} does not exist. Attempting to find .python-version file.`);
65275+ if (!fs_1.default.existsSync('.python-version')) {
65276+ throw new Error(`The specified python version file at: ${versionFile} does not exist and default .python-version file isn't found.`);
6528065277 }
6528165278 else {
65282- throw new Error(`The specified python version file at: ${ versionFile} does not exist and default ${defaultVersionFile} file isn't found.`) ;
65279+ versionFile = '.python-version' ;
6528365280 }
6528465281 }
6528565282 version = fs_1.default.readFileSync(versionFile, 'utf8');
6528665283 core.info(`Resolved ${versionFile} as ${version}`);
6528765284 return version;
6528865285 }
65289- core.warning ("Neither 'python-version' nor 'python-version-file' inputs were supplied.");
65286+ logWarning ("Neither 'python-version' nor 'python-version-file' inputs were supplied.");
6529065287 return version;
6529165288}
6529265289function run() {
@@ -65331,6 +65328,11 @@ function run() {
6533165328 }
6533265329 });
6533365330}
65331+ function logWarning(message) {
65332+ const warningPrefix = '[warning]';
65333+ core.info(`${warningPrefix}${message}`);
65334+ }
65335+ exports.logWarning = logWarning;
6533465336run();
6533565337
6533665338
0 commit comments