mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-20 18:14:29 -07:00
Disallow unsafe type assertions (#18688)
This commit is contained in:
committed by
GitHub
parent
bce1caefd0
commit
fd65416a2f
@@ -115,6 +115,7 @@ async function initOauthClient(
|
||||
|
||||
if (
|
||||
credentials &&
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
||||
(credentials as { type?: string }).type ===
|
||||
'external_account_authorized_user'
|
||||
) {
|
||||
@@ -602,6 +603,7 @@ export function getAvailablePort(): Promise<number> {
|
||||
}
|
||||
const server = net.createServer();
|
||||
server.listen(0, () => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
||||
const address = server.address()! as net.AddressInfo;
|
||||
port = address.port;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user