From 65485dc1a3b8b7a4dda340c762aeb2ec9d4347d8 Mon Sep 17 00:00:00 2001 From: Ranjan Mohanty Date: Mon, 16 Nov 2026 00:23:03 +0100 Subject: [PATCH] Codacy: error listener in a block with console.error (the rule crashed on an expression body) Validated with ESLint 8 + eslint-plugin-security-node, the rules Codacy runs. Co-Authored-By: Claude Opus 5.5 --- src/cli/github-app.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cli/github-app.ts b/src/cli/github-app.ts index 5a2df79..849e2b1 100644 --- a/src/cli/github-app.ts +++ b/src/cli/github-app.ts @@ -2,7 +2,7 @@ import { spawn } from 'node:child_process'; import type { AppCredentials } from '../core/github.js'; import { appJwt } from '../core/github.js'; -import { CliError, info } from './ui.js'; +import { CliError } from './ui.js'; const API = 'https://api.github.com'; const headers = { @@ -17,7 +17,9 @@ export function openBrowser(url: string): void { const args = process.platform === 'win32' ? ['/c', 'start', '', url] : [url]; try { spawn(cmd, args, { stdio: 'ignore', detached: true }) - .on('error', () => info(`Couldn't open a browser; open the link above.`)) + .on('error', () => { + console.error(` Couldn't open a browser; open the link above.`); + }) .unref(); } catch { // The URL is printed too.