@@ -65241,6 +65241,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
65241
65241
return (mod && mod.__esModule) ? mod : { "default": mod };
65242
65242
};
65243
65243
Object.defineProperty(exports, "__esModule", ({ value: true }));
65244
+ exports.logWarning = void 0;
65244
65245
const core = __importStar(__nccwpck_require__(2186));
65245
65246
const finder = __importStar(__nccwpck_require__(9996));
65246
65247
const finderPyPy = __importStar(__nccwpck_require__(4003));
@@ -65269,24 +65270,20 @@ function resolveVersionInput() {
65269
65270
return version;
65270
65271
}
65271
65272
if (versionFile) {
65272
- const defaultVersionFile = '.python-version';
65273
65273
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.`);
65280
65277
}
65281
65278
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' ;
65283
65280
}
65284
65281
}
65285
65282
version = fs_1.default.readFileSync(versionFile, 'utf8');
65286
65283
core.info(`Resolved ${versionFile} as ${version}`);
65287
65284
return version;
65288
65285
}
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.");
65290
65287
return version;
65291
65288
}
65292
65289
function run() {
@@ -65331,6 +65328,11 @@ function run() {
65331
65328
}
65332
65329
});
65333
65330
}
65331
+ function logWarning(message) {
65332
+ const warningPrefix = '[warning]';
65333
+ core.info(`${warningPrefix}${message}`);
65334
+ }
65335
+ exports.logWarning = logWarning;
65334
65336
run();
65335
65337
65336
65338
0 commit comments