mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 22:18:07 +08:00
fix: 解决本地应用升级失败的问题 (#813)
This commit is contained in:
parent
eeb5fa81a1
commit
bbf610569d
@ -226,6 +226,10 @@ func upgradeInstall(installId uint, detailId uint) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
detailDir := path.Join(constant.ResourceDir, "apps", install.App.Key, "versions", detail.Version)
|
detailDir := path.Join(constant.ResourceDir, "apps", install.App.Key, "versions", detail.Version)
|
||||||
|
if install.App.Resource == constant.AppResourceLocal {
|
||||||
|
detailDir = path.Join(constant.ResourceDir, "localApps", strings.TrimPrefix(install.App.Key, "local"), "versions", detail.Version)
|
||||||
|
}
|
||||||
|
|
||||||
cmd := exec.Command("/bin/bash", "-c", fmt.Sprintf("cp -rf %s/* %s", detailDir, install.GetPath()))
|
cmd := exec.Command("/bin/bash", "-c", fmt.Sprintf("cp -rf %s/* %s", detailDir, install.GetPath()))
|
||||||
stdout, err := cmd.CombinedOutput()
|
stdout, err := cmd.CombinedOutput()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -183,7 +183,9 @@ const saveContent = (closePage: boolean) => {
|
|||||||
loading.value = false;
|
loading.value = false;
|
||||||
open.value = !closePage;
|
open.value = !closePage;
|
||||||
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
MsgSuccess(i18n.global.t('commons.msg.updateSuccess'));
|
||||||
handleClose();
|
if (closePage) {
|
||||||
|
handleClose();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user