-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix error printing when login command fails (#32)
Currently, when the login command fails, it looks like this - ``` > github nelson nelson.example.com / Post https://nelson.example.com/auth/github: dial tcp 10.10.10.10:443: connect: operation timed oSuccessfully logged in to nelson.example.com ``` This is confusing as the login actually failed yet it says "Successfully logged in", and it also truncates the error message. This PR fixes that by ensuring all the errors are printed properly without the spinner interfering. It also honours the global timeout setting, and moves the error to the end of the return arg list as per Go convention. There is a minor change in timeout behaviour too - previously, the login command would wait until the server times out. Now, it has a default timeout of 60 seconds, in line with all the other commands.
- Loading branch information
Showing
2 changed files
with
15 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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