Skip to content

Commit c413d20

Browse files
authored
Change to setFailed if a repo fails
1 parent 32e1af5 commit c413d20

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

lib/query.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/query.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/query.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import path from "path";
33
import { chdir, cwd } from "process";
44

55
import { create as createArtifactClient } from "@actions/artifact";
6-
import { getInput, setSecret, error } from "@actions/core";
6+
import { getInput, setSecret, setFailed } from "@actions/core";
77

88
import { downloadDatabase, runQuery } from "./codeql";
99

@@ -64,10 +64,10 @@ async function run(): Promise<void> {
6464
);
6565
}
6666
} catch (err: any) {
67-
error(err.message);
67+
setFailed(err.message);
68+
6869
// Write error messages to a file and upload as an artifact, so that the
6970
// combine-results job "knows" about the failures
70-
7171
mkdirSync("errors");
7272
const errorFile = path.join(cwd(), "errors", "error.txt");
7373
appendFileSync(errorFile, err.message); // TODO: Include information about which repository produced the error

0 commit comments

Comments
 (0)