Skip to content

Commit 7cede07

Browse files
author
Rohan Jain
committed
Catch tunnel kill and file unlink errors
1 parent ec1d8ca commit 7cede07

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

bin/runner.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,16 @@ var cleanUp = function cleanUp () {
3636
}
3737
}
3838

39-
process.kill(tunnel.process.pid, 'SIGKILL');
40-
fs.unlink(pid_file);
39+
try {
40+
process.kill(tunnel.process.pid, 'SIGKILL');
41+
} catch (e) {
42+
console.log("Non existant tunnel");
43+
}
44+
try {
45+
fs.unlink(pid_file);
46+
} catch (e) {
47+
console.log("Non existant pid file.");
48+
}
4149
};
4250

4351
process.on('exit', cleanUp);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "browserstack-runner",
33
"description": "A command line interface to run browser tests over BrowserStack",
4-
"version": "0.0.7",
4+
"version": "0.0.8",
55
"homepage": "https://github.com/browserstack/browserstack-runner",
66
"repository": {
77
"type": "git",

0 commit comments

Comments
 (0)