@@ -64573,9 +64573,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
64573
64573
};
64574
64574
Object.defineProperty(exports, "__esModule", ({ value: true }));
64575
64575
const glob = __importStar(__nccwpck_require__(8090));
64576
+ const io = __importStar(__nccwpck_require__(7436));
64576
64577
const path = __importStar(__nccwpck_require__(1017));
64577
64578
const exec = __importStar(__nccwpck_require__(1514));
64579
+ const core = __importStar(__nccwpck_require__(2186));
64578
64580
const cache_distributor_1 = __importDefault(__nccwpck_require__(8953));
64581
+ const utils_1 = __nccwpck_require__(1314);
64579
64582
class PoetryCache extends cache_distributor_1.default {
64580
64583
constructor(pythonVersion, patterns = '**/poetry.lock') {
64581
64584
super('poetry', patterns);
@@ -64591,6 +64594,17 @@ class PoetryCache extends cache_distributor_1.default {
64591
64594
if (poetryConfig['virtualenvs.in-project'] === true) {
64592
64595
paths.push(path.join(process.cwd(), '.venv'));
64593
64596
}
64597
+ const pythonLocation = yield io.which('python');
64598
+ if (pythonLocation) {
64599
+ core.debug(`pythonLocation is ${pythonLocation}`);
64600
+ const { exitCode, stderr } = yield exec.getExecOutput(`poetry env use ${pythonLocation}`, undefined, { ignoreReturnCode: true });
64601
+ if (exitCode) {
64602
+ utils_1.logWarning(stderr);
64603
+ }
64604
+ }
64605
+ else {
64606
+ utils_1.logWarning('python binaries were not found in PATH');
64607
+ }
64594
64608
return paths;
64595
64609
});
64596
64610
}
@@ -65241,7 +65255,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
65241
65255
return (mod && mod.__esModule) ? mod : { "default": mod };
65242
65256
};
65243
65257
Object.defineProperty(exports, "__esModule", ({ value: true }));
65244
- exports.logWarning = void 0;
65245
65258
const core = __importStar(__nccwpck_require__(2186));
65246
65259
const finder = __importStar(__nccwpck_require__(9996));
65247
65260
const finderPyPy = __importStar(__nccwpck_require__(4003));
@@ -65277,14 +65290,14 @@ function resolveVersionInput() {
65277
65290
core.info(`Resolved ${versionFile} as ${version}`);
65278
65291
return version;
65279
65292
}
65280
- logWarning("Neither 'python-version' nor 'python-version-file' inputs were supplied. Attempting to find '.python-version' file.");
65293
+ utils_1. logWarning("Neither 'python-version' nor 'python-version-file' inputs were supplied. Attempting to find '.python-version' file.");
65281
65294
versionFile = '.python-version';
65282
65295
if (fs_1.default.existsSync(versionFile)) {
65283
65296
version = fs_1.default.readFileSync(versionFile, 'utf8');
65284
65297
core.info(`Resolved ${versionFile} as ${version}`);
65285
65298
return version;
65286
65299
}
65287
- logWarning(`${versionFile} doesn't exist.`);
65300
+ utils_1. logWarning(`${versionFile} doesn't exist.`);
65288
65301
return version;
65289
65302
}
65290
65303
function run() {
@@ -65332,11 +65345,6 @@ function run() {
65332
65345
}
65333
65346
});
65334
65347
}
65335
- function logWarning(message) {
65336
- const warningPrefix = '[warning]';
65337
- core.info(`${warningPrefix}${message}`);
65338
- }
65339
- exports.logWarning = logWarning;
65340
65348
run();
65341
65349
65342
65350
@@ -65379,7 +65387,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
65379
65387
return (mod && mod.__esModule) ? mod : { "default": mod };
65380
65388
};
65381
65389
Object.defineProperty(exports, "__esModule", ({ value: true }));
65382
- 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;
65390
+ 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;
65383
65391
const cache = __importStar(__nccwpck_require__(7799));
65384
65392
const core = __importStar(__nccwpck_require__(2186));
65385
65393
const fs_1 = __importDefault(__nccwpck_require__(7147));
@@ -65480,6 +65488,11 @@ function getLinuxOSReleaseInfo() {
65480
65488
});
65481
65489
}
65482
65490
exports.getLinuxOSReleaseInfo = getLinuxOSReleaseInfo;
65491
+ function logWarning(message) {
65492
+ const warningPrefix = '[warning]';
65493
+ core.info(`${warningPrefix}${message}`);
65494
+ }
65495
+ exports.logWarning = logWarning;
65483
65496
65484
65497
65485
65498
/***/ }),
0 commit comments