From 4ff0727006068463c1ef3892f375c0d2acb3ce69 Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Wed, 18 Feb 2026 18:48:52 -0800 Subject: [PATCH] use proper cwd --- src/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index 21084f8..06645a4 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -198,13 +198,13 @@ export class Hype< const pageName = (c.req.param('page') ?? 'index').replace('.', '') if (pageName.startsWith('_')) return render404(c) - const path = join(process.env.PWD ?? '.', `./src/pages/${pageName}.tsx`) + const path = join(process.cwd(), `./src/pages/${pageName}.tsx`) if (!(await Bun.file(path).exists())) return render404(c) let Layout = defaultLayout - const layoutPath = join(process.env.PWD ?? '.', `./src/pages/_layout.tsx`) + const layoutPath = join(process.cwd(), `./src/pages/_layout.tsx`) if (await Bun.file(layoutPath).exists()) { Layout = pageCache.get(layoutPath) if (!Layout) {