mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-27 19:32:44 +08:00
如果忽略输出直接退出插件
This commit is contained in:
parent
8e4ada50f1
commit
c31ad00747
@ -16,6 +16,8 @@ utools.onPluginEnter(({ code, type, payload }) => {
|
||||
option = programs[db.program];
|
||||
// 通过主输入框直接进入
|
||||
if (type == 'over') cmd = cmd.replace(/\{\{input\}\}/mg, payload);
|
||||
// 忽略输出直接退出插件
|
||||
if (db.output == "ignore") utools.outPlugin();
|
||||
// 运行脚本
|
||||
window.run(cmd, option, db.codec, (stdout, stderr) => {
|
||||
// 报错
|
||||
@ -27,9 +29,6 @@ utools.onPluginEnter(({ code, type, payload }) => {
|
||||
// 有输出
|
||||
if (stdout) {
|
||||
switch (db.output) {
|
||||
case "ignore":
|
||||
utools.outPlugin();
|
||||
break;
|
||||
case "text":
|
||||
utools.showMainWindow();
|
||||
utools.setExpendHeight(600);
|
||||
|
Loading…
x
Reference in New Issue
Block a user