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