mirror of
https://github.com/whyour/qinglong.git
synced 2026-12-01 01:39:52 +08:00
增加依赖是否已经安装判断
This commit is contained in:
1 parent
f3791cbb62
commit
b69ff2895e
6 files changed
+105
-44
No files matched your search
@@ -399,6 +399,18 @@ export function promiseExec(command: string): Promise<string> {
|
||||
});
|
||||
}
|
||||
|
||||
export function promiseExecSuccess(command: string): Promise<string> {
|
||||
return new Promise((resolve) => {
|
||||
exec(
|
||||
command,
|
||||
{ maxBuffer: 200 * 1024 * 1024, encoding: 'utf8' },
|
||||
(err, stdout, stderr) => {
|
||||
resolve(stdout || '');
|
||||
},
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
export function parseHeaders(headers: string) {
|
||||
if (!headers) return {};
|
||||
|
||||
|
||||
Reference in new issue
Block a user