Remove force from git checkout & unselect version if checkout fails (#248)
#247
This commit is contained in:
@@ -72,7 +72,12 @@ export function VersionPane({ isVisible, onClose }: VersionPaneProps) {
|
|||||||
const handleVersionClick = async (versionOid: string) => {
|
const handleVersionClick = async (versionOid: string) => {
|
||||||
if (appId) {
|
if (appId) {
|
||||||
setSelectedVersionId(versionOid);
|
setSelectedVersionId(versionOid);
|
||||||
|
try {
|
||||||
await checkoutVersion({ appId, versionId: versionOid });
|
await checkoutVersion({ appId, versionId: versionOid });
|
||||||
|
} catch (error) {
|
||||||
|
console.error("Could not checkout version, unselecting version", error);
|
||||||
|
setSelectedVersionId(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -225,7 +225,6 @@ export function registerVersionHandlers() {
|
|||||||
fs,
|
fs,
|
||||||
dir: appPath,
|
dir: appPath,
|
||||||
ref: versionId,
|
ref: versionId,
|
||||||
force: true,
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user