mirror of
https://github.com/actions/setup-python.git
synced 2025-07-03 08:03:48 +00:00
resolving comments
This commit is contained in:
parent
07c09af2d5
commit
1918fc78fb
7 changed files with 42 additions and 36 deletions
20
dist/setup/index.js
vendored
20
dist/setup/index.js
vendored
|
@ -6633,17 +6633,14 @@ const utils_1 = __webpack_require__(163);
|
|||
function isPyPyVersion(versionSpec) {
|
||||
return versionSpec.startsWith('pypy-');
|
||||
}
|
||||
function cacheDepencies(pythonVersion) {
|
||||
function cacheDepencies(cache, pythonVersion) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const cache = core.getInput('cache');
|
||||
if (cache) {
|
||||
if (utils_1.isGhes()) {
|
||||
throw new Error('Caching is not supported on GHES');
|
||||
}
|
||||
const cacheDependencyPath = core.getInput('cache-dependency-path') || undefined;
|
||||
const cacheDistributor = cache_factory_1.getCacheDistributor(cache, pythonVersion, cacheDependencyPath);
|
||||
yield cacheDistributor.restoreCache();
|
||||
if (utils_1.isGhes()) {
|
||||
throw new Error('Caching is not supported on GHES');
|
||||
}
|
||||
const cacheDependencyPath = core.getInput('cache-dependency-path') || undefined;
|
||||
const cacheDistributor = cache_factory_1.getCacheDistributor(cache, pythonVersion, cacheDependencyPath);
|
||||
yield cacheDistributor.restoreCache();
|
||||
});
|
||||
}
|
||||
function run() {
|
||||
|
@ -6663,7 +6660,10 @@ function run() {
|
|||
pythonVersion = installed.version;
|
||||
core.info(`Successfully setup ${installed.impl} (${pythonVersion})`);
|
||||
}
|
||||
yield cacheDepencies(pythonVersion);
|
||||
const cache = core.getInput('cache');
|
||||
if (cache) {
|
||||
yield cacheDepencies(cache, pythonVersion);
|
||||
}
|
||||
}
|
||||
const matchersPath = path.join(__dirname, '../..', '.github');
|
||||
core.info(`##[add-matcher]${path.join(matchersPath, 'python.json')}`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue