Unverified 提交 2bb8902b authored 作者: Will Chen's avatar Will Chen 提交者: GitHub

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

#247
上级 dbe95daf
......@@ -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);
}
}
};
......
......@@ -225,7 +225,6 @@ export function registerVersionHandlers() {
fs,
dir: appPath,
ref: versionId,
force: true,
});
});
},
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论