Skip to content

Commit dab0925

Browse files
refactor: reorder local binary process checks for clarity
1 parent 1798a93 commit dab0925

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/tools/accessiblity-utils/scanner.ts

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,19 @@ export class AccessibilityScanner {
3535
const localHosts = new Set(["127.0.0.1", "localhost", "0.0.0.0"]);
3636
const BS_LOCAL_DOMAIN = "bs-local.com";
3737

38-
if (hasLocal) {
39-
await ensureLocalBinarySetup(localIdentifier);
40-
} else {
41-
await killExistingBrowserStackLocalProcesses();
42-
}
43-
4438
if (config.USE_OWN_LOCAL_BINARY_PROCESS) {
4539
throw new Error(
4640
"Cannot start scan with local URLs when using own BrowserStack Local binary process. Please set USE_OWN_LOCAL_BINARY_PROCESS to false.",
4741
);
4842
}
4943

44+
45+
if (hasLocal) {
46+
await ensureLocalBinarySetup(localIdentifier);
47+
} else {
48+
await killExistingBrowserStackLocalProcesses();
49+
}
50+
5051
const transformedUrlList = urlList.map((url) => {
5152
try {
5253
const parsed = new URL(url);

0 commit comments

Comments
 (0)