Skip to content

Commit

Permalink
Try configuring a shorter user-data directory
Browse files Browse the repository at this point in the history
For the socket problem
  • Loading branch information
wkillerud committed Nov 3, 2024
1 parent e8004bd commit bf6dba3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
4 changes: 0 additions & 4 deletions extension/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ export async function createServerOptions(
});
socketServer.listen(
{
// We need a short-ish path to the socket because of
// https://github.com/actions/runner/issues/1676 and
// https://nodejs.org/api/net.html#identifying-paths-for-ipc-connections
path: path.join(os.tmpdir(), 'sass', 'main.sock'),
port: 0,
},
() => {
Expand Down
14 changes: 13 additions & 1 deletion extension/test/electron/run.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const path = require('node:path');
const os = require('node:os');
const fs = require('node:fs/promises');
const {
runTests,
Expand Down Expand Up @@ -45,18 +46,29 @@ async function main() {
'fixtures'
);

const userDataDir = path.join(os.tmpdir(), 'vscode-test', 'user-data');
try {
await fs.mkdir(userDataDir, { recursive: true });
} catch {
// might already exist
}

await runTests({
vscodeExecutablePath,
version,
extensionDevelopmentPath,
extensionTestsPath,
launchArgs: [
workspaceDir,
...args,
// Turn off the built-in language server to
// make sure we're testing our own.
'--disable-extension',
'vscode.css-language-features',
// We need a shorter path to the socket because of
// https://github.com/actions/runner/issues/1676 and
// https://nodejs.org/api/net.html#identifying-paths-for-ipc-connections
'--user-data-dir',
userDataDir,
],
});
}
Expand Down

0 comments on commit bf6dba3

Please sign in to comment.