From 26abb2237236e42e616a5f0056d30a356c1c4d9d Mon Sep 17 00:00:00 2001 From: Kelvin Schoofs Date: Tue, 7 Jul 2020 20:04:36 +0200 Subject: [PATCH] Fix issue #202 (Settings UI writing true instead of "pageant" to the "agent" field) --- webview/src/ConfigEditor/fields.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/webview/src/ConfigEditor/fields.tsx b/webview/src/ConfigEditor/fields.tsx index 199b0e7..445aa63 100644 --- a/webview/src/ConfigEditor/fields.tsx +++ b/webview/src/ConfigEditor/fields.tsx @@ -72,11 +72,10 @@ export function root(config: FileSystemConfig, onChange: FSCChanged<'root'>): Re } export function agent(config: FileSystemConfig, onChange: FSCChanged<'agent'>): React.ReactElement { - const callback = (newValue: string) => onChange('agent', newValue === 'pageant' ? (true as any) : newValue); + const callback = (newValue: string) => onChange('agent', newValue); const description = `Path to ssh-agent's UNIX socket for ssh-agent-based user authentication. Supports 'pageant' for PuTTY's Pagent, and environment variables, e.g. $SSH_AUTH_SOCK`; const values = ['pageant', '//./pipe/openssh-ssh-agent', '$SSH_AUTH_SOCK']; - const value = (config.agent as any) === true ? 'pageant' : config.agent; - return + return } export function username(config: FileSystemConfig, onChange: FSCChanged<'username'>): React.ReactElement {