如果忽略输出直接退出插件

This commit is contained in:
fofolee 2019-06-11 17:05:29 +08:00
parent 8e4ada50f1
commit c31ad00747

View File

@ -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);