We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 29fd8e5 commit 4ac713bCopy full SHA for 4ac713b
src/test/common/platform/utils.ts
@@ -26,8 +26,26 @@ export const SUPPORTS_SYMLINKS = (() => {
26
fsextra.unlinkSync(symlink);
27
return true;
28
})();
29
-
30
-export const SUPPORTS_SOCKETS = true;
+export const SUPPORTS_SOCKETS = (() => {
+ const tmp = tmpMod.dirSync({
31
+ prefix: 'pyvsc-test-',
32
+ unsafeCleanup: true // for non-empty dir
33
+ });
34
+ const filename = path.join(tmp.name, 'test.sock');
35
+ try {
36
+ const srv = net.createServer();
37
38
+ srv.listen(filename);
39
+ } finally {
40
+ srv.close();
41
+ }
42
+ } catch {
43
+ return false;
44
45
+ tmp.removeCallback();
46
47
+ return true;
48
+})();
49
50
export const DOES_NOT_EXIST = 'this file does not exist';
51
0 commit comments