Skip to content

Commit

Permalink
fix: entry point
Browse files Browse the repository at this point in the history
  • Loading branch information
sshivaditya committed Jan 19, 2025
1 parent de79cf8 commit 2769f45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/helpers/entry-point/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Logs } from "@ubiquity-dao/ubiquibot-logger";
import { readdir } from "fs/promises";
import { readdir, stat } from "fs/promises"; // stat instead of readdir
import { join, extname } from "path";

export type Language = "typescript" | "javascript" | "python";
Expand Down Expand Up @@ -45,7 +45,7 @@ export async function findEntryPoint(projectPath: string, logger?: Logs): Promis
try {
const fullPath = join(projectPath, entry);
logger?.info("Checking entry point:" + fullPath);
await readdir(fullPath);
await stat(fullPath); // Check if it's a file or directory
return fullPath;
} catch {
logger?.info("Entry point not found at:" + entry);
Expand Down

0 comments on commit 2769f45

Please sign in to comment.