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