From 9b182f7fafce6d2c854463507421c174d7a8bd6c Mon Sep 17 00:00:00 2001 From: Joshua Garde Date: Sun, 6 Aug 2023 19:12:20 -0700 Subject: [PATCH] Fix path resolution --- lib/utilities.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/utilities.js b/lib/utilities.js index dda1679..320af4a 100644 --- a/lib/utilities.js +++ b/lib/utilities.js @@ -54,12 +54,12 @@ export default class Utilities { ); const schemaDir = await fs.opendir(schemaPath); for await (const entry of schemaDir) { - console.log(entry); if (!entry.isFile()) { continue; } - const schema = JSON.parse(await fs.readFile(entry.path)); + const path = path.resolve(schemaPath, entry.name); + const schema = JSON.parse(await fs.readFile(path)); const name = entry.name.split('.')[0]; // Use the base name this.#ajv.addSchema(name, schema); }