mirror of
https://github.com/fofolee/uTools-quickcommand.git
synced 2025-06-07 21:46:12 +08:00
修复运行批处理的 bug
This commit is contained in:
parent
cce2bb6d1f
commit
bb54805b7e
@ -16,8 +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();
|
if (db.output == 'ignore' && option.ext == 'bat') option.bin = 'explorer';
|
||||||
// 运行脚本
|
// 运行脚本
|
||||||
window.run(cmd, option, db.codec, (stdout, stderr) => {
|
window.run(cmd, option, db.codec, (stdout, stderr) => {
|
||||||
// 报错
|
// 报错
|
||||||
@ -29,6 +29,9 @@ 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);
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user