diff --git a/src/pages/applications/[...slug].astro b/src/pages/applications/[...slug].astro index 18978b87..bd9b74af 100644 --- a/src/pages/applications/[...slug].astro +++ b/src/pages/applications/[...slug].astro @@ -33,8 +33,11 @@ if (!import.meta.env.IS_PUBLIC) { project = Astro.props; try { const { stdout } = await execAsync( - `git log -1 --pretty="format:%ci" -- "${process.cwd()}/src/content/applications/${slug}.md"` + `git log -1 --pretty="format:%ci" src/content/applications/${slug}.md` ); + if (stdout == "") { + throw new Error(`Failed to retrieve date for ${slug}.md`); + } date = new Date(stdout); } catch (e) { throw new Error(`Failed to parse date for ${slug}.md.\n${e}`);