This commit is contained in:
parent
b4654a24e2
commit
296787d242
@ -58,8 +58,16 @@ export const CreatedModifiedDate: QuartzTransformerPlugin<Partial<Options>> = (u
|
|||||||
// Get a reference to the main git repo.
|
// Get a reference to the main git repo.
|
||||||
// It's either the same as the workdir,
|
// It's either the same as the workdir,
|
||||||
// or 1+ level higher in case of a submodule/subtree setup
|
// or 1+ level higher in case of a submodule/subtree setup
|
||||||
repo = await Repository.discover(file.cwd, { search: true });
|
console.log(`Current working directory: ${file.cwd}`);
|
||||||
|
console.log(`Attempting to discover Git repository from: ${path.join(file.cwd, 'content')}`);
|
||||||
|
|
||||||
|
try {
|
||||||
|
repo = await Repository.discover(path.join(file.cwd, 'content'), { search: true });
|
||||||
console.log(chalk.green(`Git repository found at: ${repo.path()}`));
|
console.log(chalk.green(`Git repository found at: ${repo.path()}`));
|
||||||
|
} catch (error) {
|
||||||
|
console.log(chalk.red(`Error discovering Git repository: ${error.message}`));
|
||||||
|
repo = undefined;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user