Skip to content

Commit

Permalink
🐛 Fix date input for git log check
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary authored Jul 2, 2022
1 parent f97d2c4 commit 7dd439d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@ const parseNoteFile = async (
): Promise<Note> => {
const contents = await readFile(join(".", dirName, year, file), "utf8");
const dateInput = execSync(
`git log --format=%aD ${dirName}/${year}/${file}} | tail -1`
`git log --format=%aD ${dirName}/${year}/${file} | tail -1`
)
.toString()
.trim();
const date = new Date(dateInput);
console.log("Got date", dateInput, date);
return {
slug: file,
title:
Expand Down

0 comments on commit 7dd439d

Please sign in to comment.