| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -24,6 +24,7 @@ const common = require('../common'); | |||
| 24 | 24 | const fixtures = require('../common/fixtures'); | |
| 25 | 25 | const fs = require('fs'); | |
| 26 | 26 | const net = require('net'); | |
| 27 | + const path = require('path'); | ||
| 27 | 28 | const assert = require('assert'); | |
| 28 | 29 | ||
| 29 | 30 | // Test if ENOTSOCK is fired when trying to connect to a file which is not | |
@@ -38,11 +39,11 @@ if (common.isWindows) { | |||
| 38 | 39 | } else { | |
| 39 | 40 | const tmpdir = require('../common/tmpdir'); | |
| 40 | 41 | tmpdir.refresh(); | |
| 41 | - // Keep the file name very short so that we don't exceed the 108 char limit | ||
| 42 | - // on CI for a POSIX socket. Even though this isn't actually a socket file, | ||
| 43 | - // the error will be different from the one we are expecting if we exceed the | ||
| 44 | - // limit. | ||
| 45 | - emptyTxt = `${tmpdir.path}0.txt`; | ||
| 42 | + // Use a short relative path so that we don't exceed the 108 byte limit for | ||
| 43 | + // Unix socket paths in long or multibyte CI workspaces. Even though this | ||
| 44 | + // isn't actually a socket file, the error will be different from the one we | ||
| 45 | + // are expecting if the path is too long. | ||
| 46 | + emptyTxt = path.join(path.relative(process.cwd(), tmpdir.path), '0.txt'); | ||
| 46 | 47 | ||
| 47 | 48 | function cleanup() { | |
| 48 | 49 | try { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments