Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bug in cloning of repos, where worktree directory could not be cr… #673

Merged
merged 3 commits into from
Oct 22, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 6 additions & 11 deletions packages/plugins/src/DocumentAssetsPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,22 +97,17 @@ const DocumentAssetsPlugin: PluginType<Page, DocumentAssetsPluginOptions> = {

let globbedImageDirs;
try {
await fsExtra.access(resolvedSrcDir);
globbedImageDirs = await glob(assetSubDir, {
cwd: resolvedSrcDir,
onlyDirectories: true
});
} catch (err) {
if (err.code === 'ENOENT') {
console.warn(`Warning: Directory ${resolvedSrcDir} does not exist.`);
} else {
console.error(`Error globbing ${assetSubDir} in ${srcDir}:`, err);
throw err;
if (globbedImageDirs.length === 0) {
console.warn(`Warning: No entries found for ${assetSubDir}. It may not exist.`);
continue;
}
}

if (!globbedImageDirs || globbedImageDirs?.length === 0) {
continue;
} catch (err) {
console.error(`Error globbing ${assetSubDir} in ${srcDir}:`, err);
throw err;
mark-tate marked this conversation as resolved.
Show resolved Hide resolved
}

await fsExtra.ensureDir(outputDir);
Expand Down
Loading