Skip to content

Commit cdb3333

Browse files
committed
Remove extra VS Code CLI spawn
We already spawn VS Code's CLI when necessary in the lines below. Having the CLI spawn unconditionally when in a VS Code environment makes it impossible to run code-server within code-server (for example to develop it).
1 parent 6c9c840 commit cdb3333

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

src/node/entry.ts

+1-20
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,13 @@
11
import { logger } from "@coder/logger"
22
import { optionDescriptions, parse, readConfigFile, setDefaults, shouldOpenInExistingInstance } from "./cli"
3-
import { commit, pkgName, version } from "./constants"
3+
import { commit, version } from "./constants"
44
import { openInExistingInstance, runCodeServer, runVsCodeCli, shouldSpawnCliProcess } from "./main"
55
import { monkeyPatchProxyProtocols } from "./proxy_agent"
6-
import { loadAMDModule } from "./util"
76
import { isChild, wrapper } from "./wrapper"
87

9-
const cliPipe = process.env["VSCODE_IPC_HOOK_CLI"] as string
10-
const cliCommand = process.env["VSCODE_CLIENT_COMMAND"] as string
11-
128
async function entry(): Promise<void> {
139
monkeyPatchProxyProtocols()
1410

15-
if (cliPipe || cliCommand) {
16-
const remoteAgentMain = await loadAMDModule<CodeServerLib.RemoteCLIMain>("vs/server/remoteCli", "main")
17-
18-
remoteAgentMain(
19-
{
20-
productName: pkgName,
21-
version,
22-
commit,
23-
executableName: pkgName,
24-
},
25-
process.argv.slice(2),
26-
)
27-
return
28-
}
29-
3011
// There's no need to check flags like --help or to spawn in an existing
3112
// instance for the child process because these would have already happened in
3213
// the parent and the child wouldn't have been spawned. We also get the

0 commit comments

Comments
 (0)