fix(lastmod): fallback to ctx.arg.directory instead of empty string
This commit is contained in:
parent
bcde2abcb2
commit
eccad3da5d
1 changed files with 1 additions and 1 deletions
|
@ -39,7 +39,7 @@ export const CreatedModifiedDate: QuartzTransformerPlugin<Partial<Options>> = (u
|
|||
if (opts.priority.includes("git")) {
|
||||
try {
|
||||
repo = Repository.discover(ctx.argv.directory)
|
||||
repositoryWorkdir = repo.workdir() ?? ""
|
||||
repositoryWorkdir = repo.workdir() ?? ctx.argv.directory
|
||||
} catch (e) {
|
||||
console.log(
|
||||
chalk.yellow(`\nWarning: couldn't find git repository for ${ctx.argv.directory}`),
|
||||
|
|
Loading…
Add table
Reference in a new issue