Fix stale template cache by re-cloning when force-pull fails

Shallow clones (depth=1) cause isomorphic-git's fetch to fail when the
remote template has new commits. Instead of showing an error toast and
falling back to the stale cached template, delete the cache and re-clone
fresh to ensure users always get the latest template.
This commit is contained in:
Alex Gleason committed 2026-03-11 19:14:31 -05:00
1 parent 9c2984f69f
commit 50bc875423
3 files changed
+29 -37

No files matched your search

-8
View File
@@ -234,14 +234,6 @@ export default function Index() {
prompt.trim(),
template.url,
projectId,
() => {
// Show a toast if template update fails (non-critical)
toast({
title: t('templateUpdateFailed'),
description: t('templateUpdateFailedDescription'),
variant: 'default',
});
},
{ name: template.name, description: template.description }
);