@heroku-cli/command
Advanced tools
Comparing version
@@ -0,1 +1,9 @@ | ||
<a name="8.1.11"></a> | ||
## [8.1.11](https://github.com/heroku/heroku-cli-command/compare/v8.1.10...v8.1.11) (2018-05-09) | ||
### Bug Fixes | ||
* show error when opn fails ([6c9fead](https://github.com/heroku/heroku-cli-command/commit/6c9fead)) | ||
<a name="8.1.10"></a> | ||
@@ -2,0 +10,0 @@ ## [8.1.10](https://github.com/heroku/heroku-cli-command/compare/v8.1.9...v8.1.10) (2018-05-08) |
@@ -130,3 +130,10 @@ "use strict"; | ||
// TODO: handle browser | ||
await opn(`${this.loginHost}${urls.browser_url}`, { wait: false }); | ||
const url = `${this.loginHost}${urls.browser_url}`; | ||
const cp = await opn(url, { wait: false }); | ||
cp.on('error', cli_ux_1.default.error); | ||
cp.on('close', code => { | ||
if (code === 0) | ||
return; | ||
process.stderr.write(`Cannot open browser. Go to ${color_1.default.greenBright(url)} to finish login or run ${color_1.default.cmd('heroku login --interactive')}\n`); | ||
}); | ||
cli_ux_1.default.action.start('Waiting for login'); | ||
@@ -133,0 +140,0 @@ const { body: auth } = await http_call_1.default.get(`${this.loginHost}${urls.cli_url}`, { |
{ | ||
"name": "@heroku-cli/command", | ||
"description": "base class for Heroku CLI commands", | ||
"version": "8.1.10", | ||
"version": "8.1.11", | ||
"author": "Jeff Dickey @jdxcode", | ||
@@ -6,0 +6,0 @@ "bugs": "https://github.com/heroku/heroku-cli-command/issues", |
50528
1.2%1163
0.61%