Skip to content
This repository was archived by the owner on Nov 13, 2024. It is now read-only.

Commit 179baa3

Browse files
committed
Feat: 新增关闭命令选项
1 parent 1125e47 commit 179baa3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/entity/commands/general/general_command.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export default class GeneralSendCommand extends InstanceCommand {
3434
if (!instance.process) instance.failure(new Error("命令执行失败,因为实例实际进程不存在."));
3535
// instance.process.write(buf);
3636
instance.process.write(encode(buf, instance.config.oe));
37-
instance.process.write("\n");
37+
if (instance.config.crlf === 1) instance.process.write("\n");
38+
if (instance.config.crlf === 2) instance.process.write("\r\n");
3839
}
3940
}

0 commit comments

Comments
 (0)