-
Notifications
You must be signed in to change notification settings - Fork 13
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
system.newProcess(process,callback[,timeLimit])
当output字符串长度超过4096个字符时,callback返回函数会失效。
并且之后的代码无法继续执行。
但期间无任何红字报错。
To Reproduce
插件 test.js
new Promise((resolve, reject) => {
system.newProcess('"./plugins/test/output.bat"', function(_exitcode, _output){
log('输出 '+ _exitcode+' '+_output.length)
if (_exitcode == 0){
resolve("end");
}else{
logger.error(_output);
resolve(null);
}
});
}).then(result => {
log(result);
}).catch(error => {
log(error);
});
批处理 output.bat:
@echo off
for /f "tokens=*" %%a in (D:\Game\MCBE\Server\bedrock-server-1.20.62.02\plugins\test\out.txt) do ( echo %%a )
exit /b 0
文本文件 out.txt:
长度超过4096个字符的文本文件
结果
当小于4096个字符,插件输出成功,
大于4096个字符,插件输出失败,但不显示任何报错。
Expected behavior
修复此问题。支持更长的output输出。
Screenshots
No response
Platform
No response
BDS Version
No response
LeviLamina Version
0.9.0
LegacyScriptEngine Version
0.4.0
Additional context
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working