统一窗口和控件操作的参数和返回值

This commit is contained in:
fofolee
2025-01-15 19:26:07 +08:00
parent a3dc6479f2
commit fcc8f47127
8 changed files with 734 additions and 560 deletions

View File

@@ -173,15 +173,16 @@ const runCsharpFeature = async (feature, args = [], options = {}) => {
if (killPrevious && currentChild) {
quickcommand.kill(currentChild.pid, "SIGKILL");
}
console.log(featureExePath, args.join(" "));
currentChild = child_process.execFile(
featureExePath,
args,
{
encoding: null,
},
(err, stdout) => {
console.log(iconv.decode(stdout, "gbk"));
if (err) reject(iconv.decode(stdout, "gbk"));
(err, stdout, stderr) => {
if (err || Buffer.byteLength(stderr) > 0)
reject(iconv.decode(stderr || stdout, "gbk"));
else reslove(iconv.decode(stdout, "gbk"));
}
);