@heroku-cli/command
Advanced tools
Comparing version 8.1.8 to 8.1.9
@@ -0,1 +1,9 @@ | ||
<a name="8.1.9"></a> | ||
## [8.1.9](https://github.com/heroku/heroku-cli-command/compare/v8.1.8...v8.1.9) (2018-05-08) | ||
### Bug Fixes | ||
* sso logout ([102028a](https://github.com/heroku/heroku-cli-command/commit/102028a)) | ||
<a name="8.1.8"></a> | ||
@@ -2,0 +10,0 @@ ## [8.1.8](https://github.com/heroku/heroku-cli-command/compare/v8.1.7...v8.1.8) (2018-05-08) |
@@ -46,2 +46,13 @@ "use strict"; | ||
let auth; | ||
const logout = async () => { | ||
if (previousEntry && previousEntry.password) { | ||
try { | ||
await this.logout(previousEntry.password); | ||
delete previousEntry.password; | ||
} | ||
catch (err) { | ||
cli_ux_1.default.warn(err); | ||
} | ||
} | ||
}; | ||
switch (input) { | ||
@@ -58,2 +69,3 @@ case 'b': | ||
case 'sso': | ||
await logout(); // for sso logout first | ||
auth = await this.sso(previousEntry && previousEntry.org); | ||
@@ -65,10 +77,3 @@ break; | ||
await this.saveToken(auth); | ||
if (previousEntry) { | ||
try { | ||
await this.logout(previousEntry.password); | ||
} | ||
catch (err) { | ||
cli_ux_1.default.warn(err); | ||
} | ||
} | ||
await logout(); | ||
} | ||
@@ -75,0 +80,0 @@ catch (err) { |
{ | ||
"name": "@heroku-cli/command", | ||
"description": "base class for Heroku CLI commands", | ||
"version": "8.1.8", | ||
"version": "8.1.9", | ||
"author": "Jeff Dickey @jdxcode", | ||
@@ -22,7 +22,7 @@ "bugs": "https://github.com/heroku/heroku-cli-command/issues", | ||
"@oclif/tslint": "^1.1.1", | ||
"@types/ansi-styles": "^2.0.30", | ||
"@types/ansi-styles": "^3.2.0", | ||
"@types/chai": "^4.1.3", | ||
"@types/mocha": "^5.2.0", | ||
"@types/nock": "9.1.3", | ||
"@types/node": "^10.0.4", | ||
"@types/node": "^10.0.5", | ||
"@types/opn": "^5.1.0", | ||
@@ -29,0 +29,0 @@ "@types/proxyquire": "^1.3.28", |
49688
1156