Fix some flag-related bugs

feature/ssh-config
Kelvin Schoofs 4 years ago
parent d5e6a2cae8
commit 345944c086

@ -413,7 +413,7 @@ export function getFlags(): Record<string, FlagCombo> { 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()];
}
/**

@ -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);
}

Loading…
Cancel
Save