Auto-merge for PR #846 via VersionBot

Throw a clear error when logging in with an invalid token
This commit is contained in:
resin-io-versionbot[bot] 2018-04-04 19:34:56 +00:00 committed by GitHub
commit 143d88f3df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 1 deletions

View File

@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file
automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
This project adheres to [Semantic Versioning](http://semver.org/).
## v7.2.2 - 2018-04-04
* Throw a clear error when logging in with an invalid token #846 [Tim Perry]
## v7.2.1 - 2018-03-29
* Update docker-qemu-transpose to avoid the broken 0.4.1 release #839 [Tim Perry]

View File

@ -88,6 +88,11 @@ exports.login =
name: 'token'
type: 'input'
.then(resin.auth.loginWithToken)
.tap ->
resin.auth.whoami()
.then (username) ->
if !username
patterns.expectedError('Token authentication failed')
else if options.credentials
return patterns.authenticate(options)
else if options.web

View File

@ -1,6 +1,6 @@
{
"name": "resin-cli",
"version": "7.2.1",
"version": "7.2.2",
"description": "The official resin.io CLI tool",
"main": "./build/actions/index.js",
"homepage": "https://github.com/resin-io/resin-cli",