@@ -5225,139 +5225,10 @@ class ToolRunner extends events.EventEmitter {
5225
5225
return (this._endsWith(upperToolPath, '.CMD') ||
5226
5226
this._endsWith(upperToolPath, '.BAT'));
5227
5227
}
5228
- <<<<<<< HEAD
5229
5228
_windowsQuoteCmdArg(arg) {
5230
5229
// for .exe, apply the normal quoting rules that libuv applies
5231
5230
if (!this._isCmdFile()) {
5232
5231
return this._uvQuoteCmdArg(arg);
5233
- =======
5234
-
5235
- const sameDirectionIncreasing =
5236
- (this.operator === '>=' || this.operator === '>') &&
5237
- (comp.operator === '>=' || comp.operator === '>')
5238
- const sameDirectionDecreasing =
5239
- (this.operator === '<=' || this.operator === '<') &&
5240
- (comp.operator === '<=' || comp.operator === '<')
5241
- const sameSemVer = this.semver.version === comp.semver.version
5242
- const differentDirectionsInclusive =
5243
- (this.operator === '>=' || this.operator === '<=') &&
5244
- (comp.operator === '>=' || comp.operator === '<=')
5245
- const oppositeDirectionsLessThan =
5246
- cmp(this.semver, '<', comp.semver, options) &&
5247
- (this.operator === '>=' || this.operator === '>') &&
5248
- (comp.operator === '<=' || comp.operator === '<')
5249
- const oppositeDirectionsGreaterThan =
5250
- cmp(this.semver, '>', comp.semver, options) &&
5251
- (this.operator === '<=' || this.operator === '<') &&
5252
- (comp.operator === '>=' || comp.operator === '>')
5253
-
5254
- return (
5255
- sameDirectionIncreasing ||
5256
- sameDirectionDecreasing ||
5257
- (sameSemVer && differentDirectionsInclusive) ||
5258
- oppositeDirectionsLessThan ||
5259
- oppositeDirectionsGreaterThan
5260
- )
5261
- }
5262
- }
5263
-
5264
- module.exports = Comparator
5265
-
5266
- const {re, t} = __webpack_require__(328)
5267
- const cmp = __webpack_require__(752)
5268
- const debug = __webpack_require__(548)
5269
- const SemVer = __webpack_require__(206)
5270
- const Range = __webpack_require__(124)
5271
-
5272
-
5273
- /***/ }),
5274
- /* 175 */
5275
- /***/ (function(__unusedmodule, exports, __webpack_require__) {
5276
-
5277
- "use strict";
5278
-
5279
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
5280
- if (k2 === undefined) k2 = k;
5281
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5282
- }) : (function(o, m, k, k2) {
5283
- if (k2 === undefined) k2 = k;
5284
- o[k2] = m[k];
5285
- }));
5286
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
5287
- Object.defineProperty(o, "default", { enumerable: true, value: v });
5288
- }) : function(o, v) {
5289
- o["default"] = v;
5290
- });
5291
- var __importStar = (this && this.__importStar) || function (mod) {
5292
- if (mod && mod.__esModule) return mod;
5293
- var result = {};
5294
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
5295
- __setModuleDefault(result, mod);
5296
- return result;
5297
- };
5298
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
5299
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
5300
- return new (P || (P = Promise))(function (resolve, reject) {
5301
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5302
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
5303
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
5304
- step((generator = generator.apply(thisArg, _arguments || [])).next());
5305
- });
5306
- };
5307
- Object.defineProperty(exports, "__esModule", { value: true });
5308
- const core = __importStar(__webpack_require__(470));
5309
- const finder = __importStar(__webpack_require__(927));
5310
- const finderPyPy = __importStar(__webpack_require__(847));
5311
- const path = __importStar(__webpack_require__(622));
5312
- const os = __importStar(__webpack_require__(87));
5313
- const cache_factory_1 = __webpack_require__(633);
5314
- const utils_1 = __webpack_require__(163);
5315
- function isPyPyVersion(versionSpec) {
5316
- return versionSpec.startsWith('pypy-');
5317
- }
5318
- function cacheDependencies(cache, pythonVersion) {
5319
- return __awaiter(this, void 0, void 0, function* () {
5320
- const cacheDependencyPath = core.getInput('cache-dependency-path') || undefined;
5321
- const cacheDistributor = cache_factory_1.getCacheDistributor(cache, pythonVersion, cacheDependencyPath);
5322
- yield cacheDistributor.restoreCache();
5323
- });
5324
- }
5325
- function run() {
5326
- var _a;
5327
- return __awaiter(this, void 0, void 0, function* () {
5328
- // According to the README windows binaries do not require to be installed
5329
- // in the specific location, but Mac and Linux do
5330
- if (!utils_1.IS_WINDOWS && !((_a = process.env.AGENT_TOOLSDIRECTORY) === null || _a === void 0 ? void 0 : _a.trim())) {
5331
- if (utils_1.IS_LINUX)
5332
- process.env['AGENT_TOOLSDIRECTORY'] = '/opt/hostedtoolcache';
5333
- else
5334
- process.env['AGENT_TOOLSDIRECTORY'] = '/Users/runner/hostedtoolcache';
5335
- process.env['RUNNER_TOOL_CACHE'] = process.env['AGENT_TOOLSDIRECTORY'];
5336
- }
5337
- core.debug(`Python is expected to be installed into RUNNER_TOOL_CACHE=${process.env['RUNNER_TOOL_CACHE']}`);
5338
- try {
5339
- const version = core.getInput('python-version');
5340
- if (version) {
5341
- let pythonVersion;
5342
- const arch = core.getInput('architecture') || os.arch();
5343
- if (isPyPyVersion(version)) {
5344
- const installed = yield finderPyPy.findPyPyVersion(version, arch);
5345
- pythonVersion = `${installed.resolvedPyPyVersion}-${installed.resolvedPythonVersion}`;
5346
- core.info(`Successfully setup PyPy ${installed.resolvedPyPyVersion} with Python (${installed.resolvedPythonVersion})`);
5347
- }
5348
- else {
5349
- const installed = yield finder.useCpythonVersion(version, arch);
5350
- pythonVersion = installed.version;
5351
- core.info(`Successfully setup ${installed.impl} (${pythonVersion})`);
5352
- }
5353
- const cache = core.getInput('cache');
5354
- if (cache && utils_1.isCacheFeatureAvailable()) {
5355
- yield cacheDependencies(cache, pythonVersion);
5356
- }
5357
- }
5358
- const matchersPath = path.join(__dirname, '../..', '.github');
5359
- core.info(`##[add-matcher]${path.join(matchersPath, 'python.json')}`);
5360
- >>>>>>> 99015f8 (Use /opt/hostedtoolcache as default value AGENT_TOOLSDIRECTORY)
5361
5232
}
5362
5233
// otherwise apply quoting rules specific to the cmd.exe command line parser.
5363
5234
// the libuv rules are generic and are not designed specifically for cmd.exe
@@ -64693,13 +64564,16 @@ function resolveVersionInput() {
64693
64564
function run() {
64694
64565
var _a;
64695
64566
return __awaiter(this, void 0, void 0, function* () {
64696
- if ((_a = process.env.AGENT_TOOLSDIRECTORY) === null || _a === void 0 ? void 0 : _a.trim()) {
64697
- core.debug(`Python is expected to be installed into AGENT_TOOLSDIRECTORY=${process.env['AGENT_TOOLSDIRECTORY']}`);
64567
+ // According to the README windows binaries do not require to be installed
64568
+ // in the specific location, but Mac and Linux do
64569
+ if (!utils_1.IS_WINDOWS && !((_a = process.env.AGENT_TOOLSDIRECTORY) === null || _a === void 0 ? void 0 : _a.trim())) {
64570
+ if (utils_1.IS_LINUX)
64571
+ process.env['AGENT_TOOLSDIRECTORY'] = '/opt/hostedtoolcache';
64572
+ else
64573
+ process.env['AGENT_TOOLSDIRECTORY'] = '/Users/runner/hostedtoolcache';
64698
64574
process.env['RUNNER_TOOL_CACHE'] = process.env['AGENT_TOOLSDIRECTORY'];
64699
64575
}
64700
- else {
64701
- core.debug(`Python is expected to be installed into RUNNER_TOOL_CACHE==${process.env['RUNNER_TOOL_CACHE']}`);
64702
- }
64576
+ core.debug(`Python is expected to be installed into RUNNER_TOOL_CACHE=${process.env['RUNNER_TOOL_CACHE']}`);
64703
64577
try {
64704
64578
const version = resolveVersionInput();
64705
64579
if (version) {
0 commit comments