Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Ciaran Morinan <37743469+CiaranMn@users.noreply.github.com>
  • Loading branch information
indietyp and CiaranMn authored Dec 18, 2024
1 parent d2095c1 commit 99efe74
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { fileURLToPath } from "node:url";

import { type StorageContext, storageContextFromDefaults } from "llamaindex";

import { logger } from "../../../../shared/activity-logger.js";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

Expand All @@ -24,8 +26,7 @@ export const createStorageContext = async ({ hash }: { hash: string }) => {
await fs.mkdir(directoryPath, { recursive: true });
} catch (error: unknown) {
if ((error as NodeJS.ErrnoException).code !== "EEXIST") {
// eslint-disable-next-line no-console
console.info(
logger.info(
`Unable to create directory ${directoryPath}: ${(error as Error).message}`,
);
}
Expand Down

0 comments on commit 99efe74

Please sign in to comment.