heroku / heroku-accounts

Helps use multiple accounts on Heroku.
ISC License
549 stars 38 forks source link

error when trying to show accounts without having logged in #9

Closed santekotturi closed 7 years ago

santekotturi commented 7 years ago

Just setting up a new computer.

$ heroku accounts:add foo
... do login ...
$ heroku accounts:add bar
... do login ... 

no errors there ^^

try and list the accounts:

 $ heroku accounts
 ▸    Cannot read property 'login' of undefined
Error: ENOENT: no such file or directory, open '/Users/santekotturi/.cache/heroku/error.log'
    at Object.fs.openSync (fs.js:584:18)
    at Object.fs.writeFileSync (fs.js:1314:33)
    at Object.fs.appendFileSync (fs.js:1360:6)
    at log (/Users/santekotturi/.local/share/heroku/plugins/node_modules/heroku-cli-util/lib/errors.js:87:6)
    at handleErr (/Users/santekotturi/.local/share/heroku/plugins/node_modules/heroku-cli-util/lib/errors.js:102:9)
    at process._tickCallback (internal/process/next_tick.js:109:7)
    at Module.runMain (module.js:607:11)
    at run (bootstrap_node.js:427:7)
    at startup (bootstrap_node.js:151:9)
    at bootstrap_node.js:542:3

I need to set an account before I can list my accounts:

$ heroku accounts:set foo
$ heroku accounts
* foo
bar

Expected behavior: Should be able to list my accounts without being logged in/set to any of them.

Nothing major, but figured you should know.

ogirginc commented 7 years ago

This (not exact error but similar) also happens when heroku login is interrupted :

$ heroku login
Enter your Heroku credentials:
Email: ^C%
$ heroku accounts
 ▸    Cannot read property 'login' of undefined

Again, nothing major. 😊

pelargir commented 7 years ago

+1, same as @skotturi

This had me scratching my head in confusion.

sterrym commented 7 years ago

:+1: this had me confused for several minutes as well