mirror of
https://github.com/astral-sh/ruff-action.git
synced 2026-05-13 05:00:14 +02:00
Inform user of unsupported old version (#134)
Versions older than v0.0.247 do not have binaries in the GitHub releases
This commit is contained in:
committed by
GitHub
parent
b259b0b299
commit
ea12b8ac41
+4
@@ -30718,6 +30718,7 @@ const platforms_1 = __nccwpck_require__(8361);
|
||||
const inputs_1 = __nccwpck_require__(9612);
|
||||
const pyproject_1 = __nccwpck_require__(3929);
|
||||
const fs = __importStar(__nccwpck_require__(3024));
|
||||
const semver = __importStar(__nccwpck_require__(9318));
|
||||
async function run() {
|
||||
const platform = (0, platforms_1.getPlatform)();
|
||||
const arch = (0, platforms_1.getArch)();
|
||||
@@ -30743,6 +30744,9 @@ async function run() {
|
||||
}
|
||||
async function setupRuff(platform, arch, checkSum, githubToken) {
|
||||
const resolvedVersion = await determineVersion();
|
||||
if (semver.lt(resolvedVersion, "v0.0.247")) {
|
||||
throw Error("This action does not support ruff versions older than 0.0.247");
|
||||
}
|
||||
const toolCacheResult = (0, download_version_1.tryGetFromToolCache)(arch, resolvedVersion);
|
||||
if (toolCacheResult.installedPath) {
|
||||
core.info(`Found ruffDir in tool-cache for ${toolCacheResult.version}`);
|
||||
|
||||
Reference in New Issue
Block a user