fix(lint): fail check if any log errors (#1173)
This commit is contained in:
1 parent
fd457b15f7
commit
b08fbc784e
2 files changed
+6
-3
No files matched your search
@@ -66,11 +66,14 @@ const prettyPrint = (
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const log = {
|
export const log = {
|
||||||
log: (
|
failed: false,
|
||||||
|
|
||||||
|
log: function (
|
||||||
message: string,
|
message: string,
|
||||||
props: LoggerProps,
|
props: LoggerProps,
|
||||||
severity: "error" | "warning",
|
severity: "error" | "warning",
|
||||||
) => {
|
) {
|
||||||
|
if (severity === "error") this.failed = true;
|
||||||
if (Deno.env.has("CI")) {
|
if (Deno.env.has("CI")) {
|
||||||
switch (severity) {
|
switch (severity) {
|
||||||
case "error":
|
case "error":
|
||||||
|
|||||||
@@ -65,4 +65,4 @@ for await (const entry of stylesheets) {
|
|||||||
if (await checkForMissingFiles() === false) failed = true;
|
if (await checkForMissingFiles() === false) failed = true;
|
||||||
|
|
||||||
// Cause the workflow to fail if any issues were found.
|
// Cause the workflow to fail if any issues were found.
|
||||||
if (failed) Deno.exit(1);
|
if (failed || log.failed) Deno.exit(1);
|
||||||
Reference in new issue
Block a user