Skip to content

Commit

Permalink
Merge branch 'staging' into marcpe_staging
Browse files Browse the repository at this point in the history
  • Loading branch information
marcpems authored Sep 18, 2024
2 parents ca56b79 + 103fedb commit b838507
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/pages/applications/[...slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,14 @@ 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" -- "${process.cwd()}/src/content/applications/${project.id}"`
);
if (stdout == "") {
throw new Error(`Failed to retrieve date for ${project.id}`);
}
date = new Date(stdout);
} catch (e) {
throw new Error(`Failed to parse date for ${slug}.md.\n${e}`);
throw new Error(`Failed to parse date for ${project.id}\n${e}`);
}
}
---
Expand Down

0 comments on commit b838507

Please sign in to comment.