diff options
| author | Taylor Mullen <[email protected]> | 2025-04-18 19:09:41 -0400 |
|---|---|---|
| committer | N. Taylor Mullen <[email protected]> | 2025-04-18 19:14:36 -0400 |
| commit | 40e11e053c1cf304255c21f91e950c520285c6c5 (patch) | |
| tree | a2897d6236641d30b7a1014466967edf6e298ba1 /packages/cli/src/ui/hooks/useAppEffects.ts | |
| parent | 2a850ed0511033ffa88b450643d79bb47ae18693 (diff) | |
Fix remaining tslint errors (YAY).
- Also updated ci.yml to ensure that linting failures will break the build.
Fully fixes https://b.corp.google.com/issues/411384603
Diffstat (limited to 'packages/cli/src/ui/hooks/useAppEffects.ts')
| -rw-r--r-- | packages/cli/src/ui/hooks/useAppEffects.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/cli/src/ui/hooks/useAppEffects.ts b/packages/cli/src/ui/hooks/useAppEffects.ts index 7bd7c6d6..86b56223 100644 --- a/packages/cli/src/ui/hooks/useAppEffects.ts +++ b/packages/cli/src/ui/hooks/useAppEffects.ts @@ -3,6 +3,7 @@ import fs from 'fs'; import path from 'path'; import os from 'os'; import type { HistoryItem } from '../types.js'; +import { getErrorMessage } from '../../utils/errors.js'; const warningsFilePath = path.join(os.tmpdir(), 'gemini-code-cli-warnings.txt'); @@ -19,17 +20,17 @@ export function useStartupWarnings( ); try { fs.unlinkSync(warningsFilePath); - } catch (unlinkErr: any) { + } catch { setStartupWarnings((prev) => [ ...prev, `Warning: Could not delete temporary warnings file.`, ]); } } - } catch (err: any) { + } catch (err: unknown) { setStartupWarnings((prev) => [ ...prev, - `Error checking/reading warnings file: ${err.message}`, + `Error checking/reading warnings file: ${getErrorMessage(err)}`, ]); } }, [setStartupWarnings]); // Include setStartupWarnings in dependency array |
