Skip to content

Commit de01d8e

Browse files
nohwndjajaresCopilot
authored
CI Fix: Pass --user-data-dir to keep mac CI IPC socket path under 103 chars (#5514)
The default --user-data-dir lives under .vscode-test/, which combined with the nested checkout paths CI uses pushes the main IPC socket (<user-data-dir>/<version>-main.sock) over the macOS 103-char AF_UNIX limit. VS Code prints the warning, Server.listen() fails with EINVAL, tests never start. Pointing the option at os.tmpdir() shortens the path under the limit. Windows uses named pipes so it's unaffected; Linux's limit is roomier but the shorter path doesn't hurt. See microsoft/vscode#196543 for the same bug from 2023. Co-authored-by: Jakub Jares <jajares@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 03595aa commit de01d8e

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

.vscode-test.mjs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import { defineConfig } from "@vscode/test-cli";
22
import { existsSync } from "fs";
3+
import { tmpdir } from "os";
4+
import { join } from "path";
35

46
export default defineConfig({
57
files: "test/**/*.test.ts",
@@ -10,6 +12,11 @@ export default defineConfig({
1012
"--disable-extensions",
1113
// Undocumented but valid option to use a temporary profile for testing
1214
"--profile-temp",
15+
// Keep the user-data-dir short. The default lives under .vscode-test/
16+
// which, combined with the nested checkout paths CI uses, can push the
17+
// main IPC socket path over the macOS 103-char AF_UNIX limit and fail
18+
// with EINVAL. See microsoft/vscode#196543.
19+
`--user-data-dir=${join(tmpdir(), "vscp")}`,
1320
],
1421
workspaceFolder: `test/${existsSync("C:\\powershell-7\\pwsh.exe") ? "OneBranch" : "TestEnvironment"}.code-workspace`,
1522
mocha: {

0 commit comments

Comments
 (0)