test: unlink custom unix socket before test
Unlink NODE_COMMON_PIPE before running the test if set in the environment. The test runner won't do it for us like it does for files in test/tmp. PR-URL: https://github.com/node-forward/node/pull/40 Reviewed-By: Rod Vagg <rod@vagg.org>
This commit is contained in:
parent
bf23328a9c
commit
9fb7aee747
@ -37,8 +37,18 @@ if (process.platform === 'win32') {
|
||||
} else {
|
||||
exports.PIPE = exports.tmpDir + '/test.sock';
|
||||
}
|
||||
if (process.env.NODE_COMMON_PIPE)
|
||||
|
||||
if (process.env.NODE_COMMON_PIPE) {
|
||||
exports.PIPE = process.env.NODE_COMMON_PIPE;
|
||||
// Remove manually, the test runner won't do it
|
||||
// for us like it does for files in test/tmp.
|
||||
try {
|
||||
fs.unlinkSync(exports.PIPE);
|
||||
} catch (e) {
|
||||
// Ignore.
|
||||
}
|
||||
}
|
||||
|
||||
if (!fs.existsSync(exports.opensslCli))
|
||||
exports.opensslCli = false;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user