-
Notifications
You must be signed in to change notification settings - Fork 98
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
Make private key path OS indendant #2393
Conversation
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: worksofliam <[email protected]>
Signed-off-by: Seb Julliand <[email protected]>
This reverts commit f50171d.
Signed-off-by: Seb Julliand <[email protected]>
Signed-off-by: Seb Julliand <[email protected]>
Signed-off-by: Seb Julliand <[email protected]>
👋 A new build is available for this PR based on 22ba1f4. |
Signed-off-by: Seb Julliand <[email protected]>
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.
Seems like just one log that needs to be removed and then it's good to go.
Signed-off-by: Seb Julliand <[email protected]>
@worksofliam back at you! |
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.
Very good @sebjulliand! Merge away :)
Scenario
I use Code for i on several systems and I use VS Code settings synchronization so I my connection settings are shared across all my systems.
Since I may not be using the same OS and/or user name on these systems, the private key path set in the settings is different on all the systems, making it impossible to share that setting (the last path used will erase all the others because of VS Code synch).
Changes
This PR changes the connection private key path before it is stored to make it OS agnostic:
~
/
as the path segment separatorWhen the private key path is displayed in the settings or retrieved to connect to an LPAR, it is transformed to a local path:
~
is replaced with the current user home directory/
are converted back to\
when running on WindowsThis is how it looks:
In the settings:
Displayed/used on Linux
Displayed/used on Windows
This was tested on both Windows and Linux thanks to the settings synchronization. Each system used a different ed25519 private key. I created the connection from one system and I could connect from the other after the settings got synched.
A warning is displayed in the settings if the private key doesn't exist on the system.
How to test this PR
Checklist