mirror of
https://github.com/rubickCenter/rubick
synced 2025-12-26 04:19:27 +08:00
bugfix: 修复 安装包下载
This commit is contained in:
@@ -3,7 +3,6 @@ import { v4 as uuidv4 } from 'uuid';
|
||||
import {
|
||||
getWindowHeight,
|
||||
searchKeyValues,
|
||||
downloadFunc,
|
||||
sysFile,
|
||||
mergePlugins,
|
||||
find,
|
||||
@@ -221,8 +220,9 @@ const actions = {
|
||||
});
|
||||
},
|
||||
async downloadPlugin({commit}, payload) {
|
||||
await downloadZip(payload.gitUrl, payload.name);
|
||||
const fileUrl = find(path.join(__static, `plugins/${payload.name}-master`));
|
||||
const distUrl = await downloadZip(payload.downloadUrl, payload.name);
|
||||
const fileUrl = find(distUrl);
|
||||
|
||||
// 复制文件
|
||||
const config = JSON.parse(fs.readFileSync(`${fileUrl}/plugin.json`, 'utf-8'));
|
||||
const pluginConfig = {
|
||||
|
||||
Reference in New Issue
Block a user