A tiny starter project that shows how CodeHub repositories work.

fix: fall back to defaults when config is missing #2

Mergedlinus wants to merge fix/missing-config into main
Conversation1 files changed+6−1
LTlinusopened this pull request last week

Handles ENOENT in the config loader and logs a single warning.

Fixes #2.

Files changed+6 −1
src/utils.ts+6−1
@@ -1,3 +1,8 @@
+export function readConfig(path: string): Record<string, unknown> {
+ try {
+ return JSON.parse(fs.readFileSync(path, "utf8"));
+ } catch (error) {
+ return {};
+ }
+}
+
export function greet(name: string): string {
GHgracecommented last week

Merged. Thanks for the clean repro in the issue.

Sign in to review this pull request.