docs: 文档修复 & 一些格式调整
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import shelljs from 'shelljs';
|
||||
import shelljs from "shelljs";
|
||||
|
||||
export function shellExec(command: string) {
|
||||
return new Promise<number>((resolve, reject) => {
|
||||
shelljs.exec(command, { async: true, silent: false}, (code) => {
|
||||
if (code === 0) {
|
||||
resolve(0);
|
||||
} else {
|
||||
reject(new Error(`${code}`));
|
||||
}
|
||||
});
|
||||
shelljs.exec(command, { async: true, silent: false }, (code) => {
|
||||
if (code === 0) {
|
||||
resolve(0);
|
||||
} else {
|
||||
reject(new Error(`${code}`));
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user