Skip to content

Commit d108fe4

Browse files
committed
properly handle process start error
1 parent de0c5f5 commit d108fe4

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

packages/selenium-ide/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "selenium-ide",
3-
"version": "4.0.1-alpha.70",
3+
"version": "4.0.1-alpha.71",
44
"private": false,
55
"description": "Selenium IDE electron app",
66
"author": "Todd <[email protected]>",

packages/selenium-ide/src/main/session/controllers/System/index.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,10 @@ export default class SystemController extends BaseController {
5656
loggerWindow.show()
5757
// If automated, assume we already have a chromedriver process running
5858
if (!isAutomated) {
59-
try {
60-
await this.session.driver.startProcess(
61-
this.session.store.get('browserInfo')
62-
)
63-
} catch (e) {
59+
const startupError = await this.session.driver.startProcess(
60+
this.session.store.get('browserInfo')
61+
)
62+
if (startupError) {
6463
console.warn(`
6564
Failed to locate non-electron driver on startup,
6665
Resetting to electron driver.
@@ -70,12 +69,12 @@ export default class SystemController extends BaseController {
7069
useBidi: false,
7170
version: '',
7271
})
73-
const startupError = await this.session.driver.startProcess(
72+
const fallbackStartupError = await this.session.driver.startProcess(
7473
this.session.store.get('browserInfo')
7574
)
76-
if (startupError) {
75+
if (fallbackStartupError) {
7776
await this.crash(
78-
`Unable to startup due to chromedriver error: ${startupError}`
77+
`Unable to startup due to chromedriver error: ${fallbackStartupError}`
7978
)
8079
}
8180
}

0 commit comments

Comments
 (0)