Skip to content

Commit a72fa43

Browse files
fix: If the target URL is unreachable during the preflight check, the program will exit
1 parent 22f0e97 commit a72fa43

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

cmd/lite.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,7 @@ func executeLiteCollection(confPath string, isInteractive bool, browserPath stri
9898
}
9999

100100
if err := performPreflightChecks(cfg.Target.URL, cfg.UserAgents); err != nil {
101-
log.Errorf("❌ Preflight check failed: %v", err)
102-
log.Warn("Continuing anyway as the issue may be transient...")
101+
log.Fatalf("❌ Preflight check failed: %v", err)
103102
}
104103

105104
accessInfo, err := utils.GetAccessInfo(false)
@@ -313,7 +312,7 @@ func navigateAndSetup(page *rod.Page, targetURL string, ua config.UserAgentConfi
313312
}
314313

315314
// Double check user agent if it was overridden in config but not in device profile
316-
// (ToDeviceEmulation should handle this, but explicit check ensures config precedence if needed,
315+
// (ToDeviceEmulation should handle this, but explicit check ensures config precedence if needed,
317316
// though ToDeviceEmulation implementation already prefers UA string from config)
318317

319318
log.Info("Waiting for page load...")

0 commit comments

Comments
 (0)