mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-01 04:40:38 +08:00
增加依赖是否已经安装判断
This commit is contained in:
@@ -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