benpye / wsl-ssh-pageant

A Pageant -> TCP bridge for use with WSL, allowing for Pageant to be used as an ssh-ageant within the WSL environment.
BSD 2-Clause "Simplified" License
612 stars 40 forks source link

Application silently exits when SSH_AUTH_SOCK file already exists #35

Closed ferenczy closed 3 years ago

ferenczy commented 4 years ago

I just had an issue that I was unable to execute neither wsl-ssh-pageant or wsl-ssh-pageant-gui. Both just exited immediately, without any error message or log file produced. It was quite hard to debug and it took me some time to notice that the SSH_AUTH_SOCK file already existed. Probably some leftover from a previous run. I just deleted the file and it was working again.

It would be good to display some error message in such case to make user's life easier.

ferenczy commented 4 years ago

So considering the combination of the fact that it looks like the socket file (SHH_AUTH_SOCK) is being left in place when the application shutdowns and the fact that it doesn't start when the socket already exists, it's not convenient to delete the socket file manually before every start.

Fortunately, there's an option --force which instructs the application to overwrite the socket file while starting as described in #34.

But still, it would be a good UX to inform the user why the application exited in case --force is not used. Ideally both on the console and in case of wsl-ssh-pageant-gui also using a GUI dialog.

benpye commented 4 years ago

Thanks for the feedback here - I'm gonna mark this as up-for-grabs. I'm happy to approve a PR that can do this.