diff --git a/engine/src/utils/tool_runner.ts b/engine/src/utils/tool_runner.ts index 984b272..0e94e50 100644 --- a/engine/src/utils/tool_runner.ts +++ b/engine/src/utils/tool_runner.ts @@ -141,7 +141,7 @@ async function main() { '[tool_runner] Successfully parsed JSON args:', JSON.stringify(parsedArgs) ); - } catch (err) { + } catch { // If not valid JSON, use as-is console.log( '[tool_runner] Args not valid JSON, using as raw strings:', diff --git a/host/src/browser/cdp/chrome_cdp_launcher.ts b/host/src/browser/cdp/chrome_cdp_launcher.ts index 9e5b313..f439b82 100644 --- a/host/src/browser/cdp/chrome_cdp_launcher.ts +++ b/host/src/browser/cdp/chrome_cdp_launcher.ts @@ -49,7 +49,7 @@ async function checkExistingChromeInstance(port: number): Promise { const { execSync } = await import('child_process'); try { execSync(`nc -z localhost ${port}`); - } catch (e) { + } catch { console.log(`Port ${port} is not open, no Chrome instance found`); return false; } @@ -92,7 +92,7 @@ async function connectToExistingChrome( const output = execSync(`lsof -i:${port} -t`).toString().trim(); pid = parseInt(output, 10); console.log(`Found Chrome process with PID: ${pid}`); - } catch (e) { + } catch { console.log(`Could not determine PID of Chrome on port ${port}`); } @@ -123,7 +123,7 @@ async function connectToExistingChrome( `Chrome process ${pid} still running, using SIGKILL` ); execSync(`kill -KILL ${pid}`); - } catch (e) { + } catch { // Process not found, which means it's already terminated console.log( `Chrome process ${pid} successfully terminated` @@ -304,7 +304,7 @@ export async function launchChrome( const chromeVersion = execSync(chromeCommand).toString().trim(); console.log(`Detected Chrome version: ${chromeVersion}`); - } catch (e) { + } catch { console.log( 'Could not detect Chrome version, but continuing anyway' ); @@ -448,7 +448,7 @@ export async function shutdownChrome( const { execSync } = await import('child_process'); execSync(`ps -p ${pid} > /dev/null 2>&1`); return true; // Process exists - } catch (e) { + } catch { return false; // Process doesn't exist } }; @@ -624,7 +624,7 @@ export async function getChromeInfo(): Promise<{ .toString() .trim(); pid = parseInt(output, 10); - } catch (e) { + } catch { // Ignore error } @@ -638,7 +638,7 @@ export async function getChromeInfo(): Promise<{ getDefaultChromeUserDataDir(), }; } - } catch (e) { + } catch { // Ignore errors and return not running } } diff --git a/host/src/browser/cdp/chrome_profile_utils.ts b/host/src/browser/cdp/chrome_profile_utils.ts index 351f988..f5f70c4 100644 --- a/host/src/browser/cdp/chrome_profile_utils.ts +++ b/host/src/browser/cdp/chrome_profile_utils.ts @@ -294,7 +294,7 @@ export function isChromeRunning(): boolean { } } return false; - } catch (error) { + } catch (_error) { // If the command fails, assume Chrome is not running return false; } diff --git a/host/src/setup/setup.ts b/host/src/setup/setup.ts index 358018f..ee0f169 100644 --- a/host/src/setup/setup.ts +++ b/host/src/setup/setup.ts @@ -105,7 +105,7 @@ function getRecentDirectories(baseDir: string, limit: number = 10): string[] { name: dir.name, mtime: stats.mtime.getTime(), }; - } catch (error) { + } catch (_error) { // Skip directories we can't access return null; }