Skip to content

Commit fbc8c05

Browse files
author
Forest Hoffman
committed
Merge remote-tracking branch 'MASTER/master' into fix/vscode-textmate
2 parents a6f3114 + 3da1dcc commit fbc8c05

File tree

4 files changed

+16
-9
lines changed

4 files changed

+16
-9
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
* @coderasher @kylecarbs
1+
* @code-asher @kylecarbs
22
Dockerfile @nhooyr

doc/self-hosted/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ OPTIONS
8585
proxy_pass http://localhost:8443/;
8686
proxy_set_header Upgrade $http_upgrade;
8787
proxy_set_header Connection upgrade;
88+
proxy_set_header Accept-Encoding gzip;
8889
}
8990
}
9091
```

packages/server/src/cli.ts

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
import * as fse from "fs-extra";
21
import { field, logger } from "@coder/logger";
32
import { ServerMessage, SharedProcessActiveMessage } from "@coder/protocol/src/proto";
43
import { Command, flags } from "@oclif/command";
5-
import { fork, ForkOptions, ChildProcess } from "child_process";
4+
import { ChildProcess, fork, ForkOptions, spawn } from "child_process";
65
import { randomFillSync } from "crypto";
76
import * as fs from "fs";
7+
import * as fse from "fs-extra";
88
import * as os from "os";
99
import * as path from "path";
1010
import * as WebSocket from "ws";
11+
import { buildDir, cacheHome, dataHome, isCli, serveStatic } from "./constants";
12+
import { fillFs } from "./fill";
13+
import { setup as setupNativeModules } from "./modules";
1114
import { createApp } from "./server";
12-
import { requireModule, requireFork, forkModule } from "./vscode/bootstrapFork";
15+
import { forkModule, requireFork, requireModule } from "./vscode/bootstrapFork";
1316
import { SharedProcess, SharedProcessState } from "./vscode/sharedProcess";
14-
import { setup as setupNativeModules } from "./modules";
15-
import { fillFs } from "./fill";
16-
import { isCli, serveStatic, buildDir, dataHome, cacheHome } from "./constants";
1717
import opn = require("opn");
1818

1919
export class Entry extends Command {
@@ -187,7 +187,14 @@ export class Entry extends Command {
187187
return forkModule(options.env.AMD_ENTRYPOINT, args, options, dataDir);
188188
}
189189

190-
return fork(modulePath, args, options);
190+
if (isCli) {
191+
return spawn(process.execPath, ["--fork", modulePath, "--args", JSON.stringify(args), "--data-dir", dataDir], {
192+
...options,
193+
stdio: [null, null, null, "ipc"],
194+
});
195+
} else {
196+
return fork(modulePath, args, options);
197+
}
191198
},
192199
},
193200
password,

packages/server/src/vscode/bootstrapFork.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ export const requireFork = (modulePath: string, args: string[], builtInExtension
9696
}
9797

9898
process.argv = ["", "", ...args];
99-
10099
requireFilesystemModule(modulePath, builtInExtensionsDir);
101100

102101
if (ipcMsgBuffer && ipcMsgListener) {

0 commit comments

Comments
 (0)