From 345944c0868466d2bb2a66c001ec459b8fcc6fde Mon Sep 17 00:00:00 2001 From: Kelvin Schoofs Date: Wed, 7 Apr 2021 22:38:06 +0200 Subject: [PATCH] Fix some flag-related bugs --- src/config.ts | 2 +- src/connect.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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); }