Skip to content

Commit

Permalink
Merge pull request #463 from Scalingo/fix/462/disconnect
Browse files Browse the repository at this point in the history
Do not disconnect user on 401
  • Loading branch information
Soulou authored Aug 5, 2019
2 parents 025c7e6 + e2e3e9a commit c31caa0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
### To be Released

* Add support for stack aliases [#461](https://github.com/Scalingo/cli/pull/461)
* Bugfix: Do not disconnect user if the API returns 401 [#462](https://github.com/Scalingo/cli/issues/462)

### 1.15.1

Expand Down
2 changes: 0 additions & 2 deletions cmd/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (

"github.com/Scalingo/cli/config"
"github.com/Scalingo/cli/io"
"github.com/Scalingo/cli/session"
"github.com/Scalingo/go-scalingo"
"github.com/Scalingo/go-scalingo/debug"
httpclient "github.com/Scalingo/go-scalingo/http"
Expand Down Expand Up @@ -69,7 +68,6 @@ func errorQuit(err error) {
if httpclient.IsRequestFailedError(rootError) &&
rootError.(*httpclient.RequestFailedError).Code == 401 {
if currentUser != nil {
session.DestroyToken()
io.Errorf("You are currently logged in as %s.\n", currentUser.Username)
io.Errorf("Are you sure %s is a collaborator of this app?\n", currentUser.Username)
} else {
Expand Down

0 comments on commit c31caa0

Please sign in to comment.