mirror of
https://github.com/rubickCenter/rubick
synced 2025-06-20 19:22:43 +08:00
ref: bugfix windows rm 命令无法执行
This commit is contained in:
parent
9242f17cde
commit
87e7501c0a
@ -85,6 +85,7 @@
|
|||||||
"request-promise": "^4.2.6",
|
"request-promise": "^4.2.6",
|
||||||
"robotjs": "git+https://github.com/Toinane/robotjs.git",
|
"robotjs": "git+https://github.com/Toinane/robotjs.git",
|
||||||
"semver": "^7.3.5",
|
"semver": "^7.3.5",
|
||||||
|
"shelljs": "^0.8.4",
|
||||||
"sudo-prompt": "^9.2.1",
|
"sudo-prompt": "^9.2.1",
|
||||||
"systeminformation": "^5.8.0",
|
"systeminformation": "^5.8.0",
|
||||||
"unzip": "^0.1.11",
|
"unzip": "^0.1.11",
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import { WINDOW_MAX_HEIGHT, WINDOW_MIN_HEIGHT, PRE_ITEM_HEIGHT, SYSTEM_PLUGINS } from './constans';
|
import { WINDOW_MAX_HEIGHT, WINDOW_MIN_HEIGHT, PRE_ITEM_HEIGHT, SYSTEM_PLUGINS } from './constans';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import child_process from 'child_process';
|
|
||||||
import Store from 'electron-store';
|
import Store from 'electron-store';
|
||||||
import downloadFile from 'download';
|
import downloadFile from 'download';
|
||||||
import { ipcRenderer } from 'electron';
|
import { ipcRenderer } from 'electron';
|
||||||
import { getlocalDataFile } from '../../../main/common/utils';
|
import { getlocalDataFile } from '../../../main/common/utils';
|
||||||
|
import shell from 'shelljs';
|
||||||
|
|
||||||
const getApp = process.platform === 'win32' ? require('./win-app').getApp : require('./darwin-app').getApp;
|
const getApp = process.platform === 'win32' ? require('./win-app').getApp : require('./darwin-app').getApp;
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ async function downloadZip(downloadRepoUrl, name) {
|
|||||||
const temp_dest = `${plugin_path}/${name}`;
|
const temp_dest = `${plugin_path}/${name}`;
|
||||||
// 下载模板
|
// 下载模板
|
||||||
if (await existOrNot(temp_dest)) {
|
if (await existOrNot(temp_dest)) {
|
||||||
await child_process.execSync(`rm -rf ${temp_dest}`);
|
shell.rm('-rf', temp_dest);
|
||||||
}
|
}
|
||||||
|
|
||||||
await downloadFile(downloadRepoUrl, plugin_path, { extract: true });
|
await downloadFile(downloadRepoUrl, plugin_path, { extract: true });
|
||||||
|
Loading…
x
Reference in New Issue
Block a user