diff --git a/src/config.ts b/src/config.ts index fdb7444..54a6081 100644 --- a/src/config.ts +++ b/src/config.ts @@ -413,7 +413,7 @@ export function getFlags(): Record { return cachedFlags; } * @param target The name of the flag to look for */ export function getFlag(target: string): FlagCombo | undefined { - return calculateFlags()[target.toLowerCase()]; + return getFlags()[target.toLowerCase()]; } /** diff --git a/src/connect.ts b/src/connect.ts index a7c58d0..2bf4122 100644 --- a/src/connect.ts +++ b/src/connect.ts @@ -282,7 +282,7 @@ export async function createSSH(config: FileSystemConfig, options: CreateSSHOpti }); try { const finalConfig: ConnectConfig = { ...config, sock, ...DEFAULT_CONFIG }; - if (config.debug || getFlag('DEBUG_SSH2') !== undefined) { + if (config.debug || getFlagBoolean('DEBUG_SSH2', false)[0]) { const scope = Logging.scope(`ssh2(${config.name})`); finalConfig.debug = (msg: string) => scope.debug(msg); }