Skip to content
This repository was archived by the owner on Sep 21, 2021. It is now read-only.

Commit 934e2b7

Browse files
sukrosononchevobbe
authored andcommitted
revision 1
1 parent 78a05aa commit 934e2b7

File tree

1 file changed

+1
-13
lines changed
  • packages/devtools-launchpad/src/server

1 file changed

+1
-13
lines changed

packages/devtools-launchpad/src/server/launch.js

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ const ps = require("child_process");
66
const path = require("path");
77
const { isFirefoxRunning } = require("./utils/firefox");
88
const firefoxDriver = require("../../bin/firefox-driver");
9-
const isWindows = /^win/.test(process.platform);
109
const {
1110
getValue
1211
} = require("devtools-config");
@@ -24,13 +23,6 @@ function handleLaunchRequest(req, res) {
2423
tcpPort: getValue("firefox.tcpPort")
2524
};
2625
if (!isRunning) {
27-
process.on('unhandledRejection', (err)=> {
28-
if (err.message.indexOf('Could not locate Firefox on the current system')>-1) {
29-
console.error('selenium-webdriver could not locate Firefox, please launch it manually.');
30-
} else {
31-
throw err;
32-
}
33-
});
3426
firefoxDriver.start(location, options);
3527
res.end("launched firefox");
3628
} else {
@@ -41,11 +33,7 @@ function handleLaunchRequest(req, res) {
4133

4234
if (browser == "Chrome") {
4335
const chromeDriver= path.resolve(__dirname, "../../bin/chrome-driver.js");
44-
if (isWindows) {
45-
ps.spawn('node', [chromeDriver, "--location", location]);
46-
} else {
47-
ps.spawn(chromeDriver, ["--location", location]);
48-
}
36+
ps.spawn('node', [chromeDriver, "--location", location]);
4937
res.end("launched chrome");
5038
}
5139
}

0 commit comments

Comments
 (0)