Skip to content

Commit 909db48

Browse files
Fix flaky macOS CI from over-long test IPC socket path
`@vscode/test-cli` defaults `--user-data-dir` to `.vscode-test/user-data` inside the workspace. On CI the workspace is nested three deep (`.../vscode-powershell/vscode-powershell/vscode-powershell/`), so the VS Code instance's IPC socket (`<user-data-dir>/<version>-main.sock`) exceeds macOS's 104-char `AF_UNIX` limit and the editor dies at startup with `listen EINVAL`, flaking the whole matrix (and cancelling the other OSes via fail-fast). Anchor `--user-data-dir` in `os.tmpdir()` so the socket path stays short on every platform. Drafted by Copilot (Claude Opus 4.8). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent e98f196 commit 909db48

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

.vscode-test.mjs

Lines changed: 8 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,12 @@ export default defineConfig({
1012
"--disable-extensions",
1113
// Undocumented but valid option to use a temporary profile for testing
1214
"--profile-temp",
15+
// The default user-data-dir lives under the (deeply nested on CI)
16+
// workspace path, and its IPC socket blows past macOS's 104-char
17+
// unix-socket limit, causing a flaky `listen EINVAL`. Anchor it in the
18+
// OS temp dir so the socket path stays short on every platform.
19+
"--user-data-dir",
20+
join(tmpdir(), "vscode-powershell-test"),
1321
],
1422
workspaceFolder: `test/${existsSync("C:\\powershell-7\\pwsh.exe") ? "OneBranch" : "TestEnvironment"}.code-workspace`,
1523
mocha: {

0 commit comments

Comments
 (0)