Add configurable SSH config path setting - #349
Open
fioan89 wants to merge 2 commits into
Open
Conversation
Lets Toolbox write its managed SSH config to a separate file instead of always using ~/.ssh/config, so a read-only or externally managed config isn't touched. Changing the path cleans up the managed block left behind in the previous file.
Collaborator
Author
The Save action never triggered field validators or blocked closing the page, since Toolbox only checks a RunnableActionDescription's validate() before running it, and its own runValidations() helper does not look inside SectionFields. Action now accepts a validateBlock hook, and the settings page uses it to recursively validate fields nested in sections, wiring in a validator for the SSH config path that checks the target file exists and is writable (or creatable).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Lets Toolbox write its managed SSH config to a separate file instead of always using ~/.ssh/config, so a read-only or externally managed config isn't touched. Changing the path cleans up the managed block left behind in the previous file.
The Save action never triggered field validators or blocked the closing of the page when there were errors in the field configuration. We now recursively go through the fields and call their validators, if any available. When one of them returns an invalid page the Save button can no longer close the page until the issue is resolved. For now we have a validator only for the new field.