pty-shell 1.5.1 → 1.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +2 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -997,7 +997,7 @@ class PtyShell {
997
997
  this.node_pty_child.onExit(({ exitCode, signal }) => {
998
998
  // this.close_child(exitCode);
999
999
  // this.send_and_enter("");
1000
- this.send_and_enter(`pty with ${exitCode}`);
1000
+ this.send_and_enter(`pty exited with code ${exitCode !== null && exitCode !== void 0 ? exitCode : -1}`);
1001
1001
  // this.next_not_enter = false; // 下一次的换行输出 上一次没有换行
1002
1002
  resolve(exitCode !== null && exitCode !== void 0 ? exitCode : -1);
1003
1003
  });
@@ -1034,7 +1034,7 @@ class PtyShell {
1034
1034
  this.child.on('exit', (code) => {
1035
1035
  // this.close_child(code);
1036
1036
  // if (code !== 1) {
1037
- this.send_and_enter(`process exited with code ${code}`);
1037
+ this.send_and_enter(`process exited with code ${code !== null && code !== void 0 ? code : -1}`);
1038
1038
  // }
1039
1039
  // else {
1040
1040
  // this.send_and_enter(``);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pty-shell",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "description": "a virtual PTY shell for javaScript",
5
5
  "author": "xiaobaidadada",
6
6
  "main": "dist/index.js",