Skip to content

Commit 73cca96

Browse files
committed
refactor: use errorText in the check pack
1 parent 998aa01 commit 73cca96

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎packages/triage-contracts/src/check-pack.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { type } from "arktype";
2-
import { asRecord, asRepo } from "@corbits/common";
2+
import { asRecord, asRepo, errorText } from "@corbits/common";
33
import { AUTHOR_ASSOCIATIONS, type AuthorAssociation } from "./repo-policy.js";
44
import type { RepoSource } from "./repo-source.js";
55
import { compileGlob, PATTERN_LANGUAGES, PATTERN_PRESETS, type PatternRule } from "./code-patterns.js";
@@ -937,7 +937,7 @@ function checkGlobs(globs: string[] | undefined, where: string): void {
937937
try {
938938
compileGlob(glob);
939939
} catch (error) {
940-
throw new Error(`${where} glob ${JSON.stringify(glob)}: ${error instanceof Error ? error.message : String(error)}`);
940+
throw new Error(`${where} glob ${JSON.stringify(glob)}: ${errorText(error)}`);
941941
}
942942
}
943943
}

0 commit comments

Comments
 (0)