Skip to content

Commit

Permalink
Fix path resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
joshgarde committed Aug 7, 2023
1 parent 3b29386 commit 9b182f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 9b182f7

Please sign in to comment.