mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-07 13:34:08 +08:00
修复编排运行脚本的错误无法被自动捕捉的BUG
This commit is contained in:
parent
37f5ee2160
commit
9ad3d6ed6a
@ -151,6 +151,7 @@ let getSandboxFuns = () => {
|
||||
// 简化报错信息
|
||||
let liteErr = (e) => {
|
||||
if (!e) return;
|
||||
if (typeof e === "string") return e;
|
||||
return e.error
|
||||
? e.error.stack.replace(/([ ] +at.+)|(.+\.js:\d+)/g, "").trim()
|
||||
: e.message;
|
||||
|
@ -296,7 +296,7 @@ export default {
|
||||
? alert(stderr)
|
||||
: this.showRunResult(stderr, false);
|
||||
}
|
||||
!options.action(stdout.toString()) || this.showRunResult(stdout, true);
|
||||
!options.action(stdout?.toString()) || this.showRunResult(stdout, true);
|
||||
},
|
||||
// 显示运行结果
|
||||
async showRunResult(content, isSuccess) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user