Skip to content

Commit f0ec9f9

Browse files
committed
fix: update accounts:current error text
1 parent 920eae4 commit f0ec9f9

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

packages/cli/src/commands/accounts/current.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default class Current extends Command {
1313
if (account) {
1414
ux.styledHeader(`Current account is ${account}`)
1515
} else {
16-
ux.error(`You haven't set an account. Run ${color.cmd('heroku login')} to confirm you're logged in to Heroku.`)
16+
ux.error(`You haven't set an account. Run ${color.cmd('heroku accounts:add <account-name>')} to add an account to your cache or ${color.cmd('heroku accounts:set <account-name>')} to set the current account.`)
1717
}
1818
}
1919
}

packages/cli/test/unit/commands/accounts/current.unit.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ import * as sinon from 'sinon'
44
import Cmd from '../../../../src/commands/accounts/current'
55
import * as accounts from '../../../../src/lib/accounts/accounts'
66
import {stdout} from 'stdout-stderr'
7-
import heredoc from 'tsheredoc'
87
import stripAnsi = require('strip-ansi')
98

10-
describe('accounts:current', function () {
9+
describe.only('accounts:current', function () {
1110
let currentStub: sinon.SinonStub
1211

1312
beforeEach(function () {
@@ -28,7 +27,7 @@ describe('accounts:current', function () {
2827
currentStub.returns(null)
2928
await runCommand(Cmd, [])
3029
.catch((error: Error) => {
31-
expect(stripAnsi(error.message)).to.equal('You haven\'t set an account. Run heroku login to confirm you\'re logged in to Heroku.')
30+
expect(stripAnsi(error.message)).to.equal('You haven\'t set an account. Run heroku accounts:add <account-name> to add an account to your cache or heroku accounts:set <account-name> to set the current account.')
3231
})
3332
})
3433
})

0 commit comments

Comments
 (0)