Skip to content

Commit 6329796

Browse files
committed
Use regular Node for watch
Since we spawn the watch script with ts-node it was using ts-node for the web server spawn as well. With latest Code there are for some reason type errors (it cannot find @types/node) but this is already compiled code which already passed type checks; any type errors here are useless. To fix spawn with regular Node.
1 parent aa56f97 commit 6329796

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ci/dev/watch.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { spawn, fork, ChildProcess } from "child_process"
1+
import { spawn, ChildProcess } from "child_process"
22
import * as path from "path"
33
import { onLine, OnLineCallback } from "../../src/node/util"
44

@@ -30,7 +30,7 @@ class Watcher {
3030

3131
// Pass CLI args, save for `node` and the initial script name.
3232
const args = process.argv.slice(2)
33-
this.webServer = fork(path.join(this.rootPath, "out/node/entry.js"), args)
33+
this.webServer = spawn("node", [path.join(this.rootPath, "out/node/entry.js"), ...args])
3434
const { pid } = this.webServer
3535

3636
this.webServer.on("exit", () => console.log("[Code Server]", `Web process ${pid} exited`))

0 commit comments

Comments
 (0)