Skip to content

Commit 9d5fb36

Browse files
committed
🐛 fix windows bug
1 parent b0dc611 commit 9d5fb36

File tree

5 files changed

+19
-7
lines changed

5 files changed

+19
-7
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/cli/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "graphql-editor-cli",
3-
"version": "0.8.4",
3+
"version": "0.8.5",
44
"description": "GraphQL -> anything. Use GraphQL as your source of truth. GraphQL Editor Official CLI.",
55
"main": "lib/api.js",
66
"author": "Artur Czemiel",

packages/cli/src/common/stucco/index.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import fs from 'fs';
22
import path from 'path';
33
import { logger } from '@/common/log/index.js';
4-
import { ChildProcess } from 'child_process';
4+
import { ChildProcess, spawn } from 'child_process';
55
import { SIGINT } from 'constants';
66
import { terminate, spawnPromise } from '@/common/spawn.js';
77
import { platform } from 'os';
@@ -80,6 +80,18 @@ export const stuccoRun = async (props?: {
8080
}
8181
},
8282
onCloseStucco: () => {
83+
const p = platform();
84+
if (p === 'win32' && stuccoChildProcess?.pid) {
85+
try {
86+
spawn('taskkill', [
87+
'/pid',
88+
stuccoChildProcess.pid.toString(),
89+
'/f',
90+
'/t',
91+
]);
92+
} catch {}
93+
return;
94+
}
8395
stuccoChildProcess?.kill(SIGINT);
8496
},
8597
};

packages/sandbox/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "sandbox",
33
"private": true,
4-
"version": "0.8.4",
4+
"version": "0.8.5",
55
"description": "GraphQL -> anything. Use GraphQL as your source of truth. GraphQL Editor Official CLI.",
66
"author": "Artur Czemiel",
77
"license": "MIT",

0 commit comments

Comments
 (0)