Skip to content

Commit 30ce10a

Browse files
committed
Fix watcher not restarting code-server on VS Code compilation
The "Starting watch-client" string no longer appears in the latest build output. We could look for "Finished compilation with" to avoid restarting when other tasks restart (since they also include the name i.e. "Finished compilation extensions with 0 errors") but I figure we might as well restart code-server when any compilation task completes in case other tasks include changes that need to be reloaded.
1 parent ccb9d94 commit 30ce10a

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

ci/dev/watch.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -106,19 +106,10 @@ class Watcher {
106106
plugin.stderr.on("data", (d) => process.stderr.write(d))
107107
}
108108

109-
let startingVscode = false
110-
let startedVscode = false
111109
onLine(vscode, (line, original) => {
112110
console.log("[vscode]", original)
113-
// Wait for watch-client since "Finished compilation" will appear multiple
114-
// times before the client starts building.
115-
if (!startingVscode && line.includes("Starting watch-client")) {
116-
startingVscode = true
117-
} else if (startingVscode && line.includes("Finished compilation")) {
118-
if (startedVscode) {
119-
restartServer()
120-
}
121-
startedVscode = true
111+
if (line.includes("Finished compilation")) {
112+
restartServer()
122113
}
123114
})
124115

0 commit comments

Comments
 (0)