Remove force from git checkout & unselect version if checkout fails (#248)

#247
This commit is contained in:
Will Chen authored and GitHub committed 2025-05-26 11:35:36 -07:00
1 parent dbe95dafc4
commit 2bb8902b08
2 files changed
+6 -2

No files matched your search

+6 -1
View File
@@ -72,7 +72,12 @@ export function VersionPane({ isVisible, onClose }: VersionPaneProps) {
const handleVersionClick = async (versionOid: string) => {
if (appId) {
setSelectedVersionId(versionOid);
await checkoutVersion({ appId, versionId: versionOid });
try {
await checkoutVersion({ appId, versionId: versionOid });
} catch (error) {
console.error("Could not checkout version, unselecting version", error);
setSelectedVersionId(null);
}
}
};
-1
View File
@@ -225,7 +225,6 @@ export function registerVersionHandlers() {
fs,
dir: appPath,
ref: versionId,
force: true,
});
});
},