mirror of
https://github.com/astral-sh/ruff-action.git
synced 2026-05-21 16:30:14 +02:00
Set output format to github (#24)
This was accidentally removed in the v2 release
This commit is contained in:
committed by
GitHub
parent
ec9ad4417f
commit
a2d5d1ffa4
+5
@@ -34613,6 +34613,7 @@ function run() {
|
|||||||
}
|
}
|
||||||
const setupResult = yield setupRuff(platform, arch, inputs_1.version, inputs_1.checkSum, inputs_1.githubToken);
|
const setupResult = yield setupRuff(platform, arch, inputs_1.version, inputs_1.checkSum, inputs_1.githubToken);
|
||||||
addRuffToPath(setupResult.ruffDir);
|
addRuffToPath(setupResult.ruffDir);
|
||||||
|
setOutputFormat();
|
||||||
core.setOutput("ruff-version", setupResult.version);
|
core.setOutput("ruff-version", setupResult.version);
|
||||||
core.info(`Successfully installed ruff version ${setupResult.version}`);
|
core.info(`Successfully installed ruff version ${setupResult.version}`);
|
||||||
yield runRuff(path.join(setupResult.ruffDir, "ruff"), inputs_1.args.split(" "), inputs_1.src.split(" "));
|
yield runRuff(path.join(setupResult.ruffDir, "ruff"), inputs_1.args.split(" "), inputs_1.src.split(" "));
|
||||||
@@ -34645,6 +34646,10 @@ function addRuffToPath(cachedPath) {
|
|||||||
core.addPath(cachedPath);
|
core.addPath(cachedPath);
|
||||||
core.info(`Added ${cachedPath} to the path`);
|
core.info(`Added ${cachedPath} to the path`);
|
||||||
}
|
}
|
||||||
|
function setOutputFormat() {
|
||||||
|
core.exportVariable("RUFF_OUTPUT_FORMAT", "github");
|
||||||
|
core.info("Set RUFF_OUTPUT_FORMAT to github");
|
||||||
|
}
|
||||||
function runRuff(ruffExecutablePath, args, src) {
|
function runRuff(ruffExecutablePath, args, src) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const execArgs = [...args, ...src];
|
const execArgs = [...args, ...src];
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ async function run(): Promise<void> {
|
|||||||
);
|
);
|
||||||
|
|
||||||
addRuffToPath(setupResult.ruffDir);
|
addRuffToPath(setupResult.ruffDir);
|
||||||
|
setOutputFormat();
|
||||||
core.setOutput("ruff-version", setupResult.version);
|
core.setOutput("ruff-version", setupResult.version);
|
||||||
core.info(`Successfully installed ruff version ${setupResult.version}`);
|
core.info(`Successfully installed ruff version ${setupResult.version}`);
|
||||||
|
|
||||||
@@ -86,6 +87,11 @@ function addRuffToPath(cachedPath: string): void {
|
|||||||
core.info(`Added ${cachedPath} to the path`);
|
core.info(`Added ${cachedPath} to the path`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setOutputFormat() {
|
||||||
|
core.exportVariable("RUFF_OUTPUT_FORMAT", "github");
|
||||||
|
core.info("Set RUFF_OUTPUT_FORMAT to github");
|
||||||
|
}
|
||||||
|
|
||||||
async function runRuff(
|
async function runRuff(
|
||||||
ruffExecutablePath: string,
|
ruffExecutablePath: string,
|
||||||
args: string[],
|
args: string[],
|
||||||
|
|||||||
Reference in New Issue
Block a user