Set session socket into environment variable (#6282)
* Avoid spawning code-server with --reuse-window and --new-window These flags mean the user explicitly wants to open in an existing instance so if the socket is down it should error rather than try to spawn code-server normally. * Set session socket into environment variable While I was at it I added a CLI flag to override the default. I also swapped the default to --user-data-dir. The value is set on an environment variable so it can be used by the extension host similar to VSCODE_IPC_HOOK_CLI. * Add e2e test for opening files externally
This commit is contained in:
@ -1,19 +1,8 @@
|
||||
import { logger } from "@coder/logger"
|
||||
import * as app from "../../../src/node/app"
|
||||
import { paths } from "../../../src/node/util"
|
||||
import {
|
||||
DEFAULT_SOCKET_PATH,
|
||||
EditorSessionManager,
|
||||
makeEditorSessionManagerServer,
|
||||
} from "../../../src/node/vscodeSocket"
|
||||
import { EditorSessionManager, makeEditorSessionManagerServer } from "../../../src/node/vscodeSocket"
|
||||
import { clean, tmpdir, listenOn, mockLogger } from "../../utils/helpers"
|
||||
|
||||
describe("DEFAULT_SOCKET_PATH", () => {
|
||||
it("should be a unique path per user", () => {
|
||||
expect(DEFAULT_SOCKET_PATH.startsWith(paths.data)).toBe(true)
|
||||
})
|
||||
})
|
||||
|
||||
describe("makeEditorSessionManagerServer", () => {
|
||||
let tmpDirPath: string
|
||||
|
||||
|
Reference in New Issue
Block a user