-
Notifications
You must be signed in to change notification settings - Fork 23
feat: validate ssh properties before launching workspaces #96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, we should probably handle the =
case for config options, but LGTM otherwise! 👍🏻
src/remote.ts
Outdated
{ | ||
useCustom: true, | ||
modal: true, | ||
detail: `Your SSH config is overriding the "${key}=${computedProperties[key]}" option for the "${hostName}" host. Please remove it and try again!`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could add "overriding the key=correct with key=wrong ..." to help trace the issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point!
src/sshSupport.ts
Outdated
if (line === "") { | ||
return | ||
} | ||
const [key, ...valueParts] = line.split(/\s+/) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Separator could be =
or space.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, great point! I'll add a test case.
This was reported by a member in Discord, and displayed a poor error by VS Code when it failed before. Users cannot override our config options otherwise connections may fail or have unexpected behavior.
This was reported by a member in Discord, and displayed a poor error by VS Code when it failed before.
Users cannot override our config options otherwise connections may fail or have unexpected behavior.