@astrosheep/keiyaku 4.3.0 → 4.4.0

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.
@@ -31,6 +31,7 @@ function createWindowsContext(input, log, from, closeLog) {
31
31
  stderr: "",
32
32
  started: false,
33
33
  targetPid: undefined,
34
+ released: false,
34
35
  finished: false,
35
36
  startedPromise,
36
37
  startedResolve,
@@ -45,6 +46,8 @@ function createWindowsContext(input, log, from, closeLog) {
45
46
  return context;
46
47
  }
47
48
  function failWindows(context, error) {
49
+ if (context.released)
50
+ return;
48
51
  context.lifecycle?.markInert();
49
52
  if (!context.started)
50
53
  context.startedReject(error);
@@ -126,6 +129,8 @@ function handleWindowsLine(context, line) {
126
129
  function installWindowsProtocol(context) {
127
130
  context.child.once("error", (error) => failWindows(context, error));
128
131
  context.child.once("close", () => {
132
+ if (context.released)
133
+ return;
129
134
  if (!context.started) {
130
135
  failWindows(context, launchFailure(context.input.argv[0] ?? "windows-launch.exe", context.stderr.trim()));
131
136
  }
@@ -140,6 +145,7 @@ function ownedWindowsProcess(context, pid) {
140
145
  await terminateWindowsTree(pid);
141
146
  await context.exited;
142
147
  }, () => {
148
+ context.released = true;
143
149
  context.reader.close();
144
150
  context.child.stdin?.write("release\n");
145
151
  context.child.stdin?.end();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrosheep/keiyaku",
3
- "version": "4.3.0",
3
+ "version": "4.4.0",
4
4
  "files": [
5
5
  "build"
6
6
  ],