fix:DEP无法正常抛出错误

This commit is contained in:
Tianpao
2025-07-26 13:29:47 +08:00
parent 9f9cfc3e17
commit 32f7473533

View File

@@ -153,6 +153,8 @@ export async function DeEarth(modpath: string, movepath: string) {
try { try {
if (JSON.parse(await FastGot(`https://dearth.0771010.xyz/api/modid?modid=${modid}`)).isClient) { if (JSON.parse(await FastGot(`https://dearth.0771010.xyz/api/modid?modid=${modid}`)).isClient) {
fs.renameSync(modpath, `${movepath}/${path.basename(modpath)}`) fs.renameSync(modpath, `${movepath}/${path.basename(modpath)}`)
}else{
throw new Error("DeEarthPublic Not Found This Mod")
} }
} catch (error) { //mods.toml或fabric.mod.json判断 } catch (error) { //mods.toml或fabric.mod.json判断
try{ try{