fix(lastmod): fallback to ctx.arg.directory instead of empty string
This commit is contained in:
		
							parent
							
								
									bcde2abcb2
								
							
						
					
					
						commit
						eccad3da5d
					
				| @ -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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user