Skip to content

Commit

Permalink
feat: improve user message
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarosabu committed Oct 7, 2024
1 parent 8068eec commit 55e8efd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/commands/user/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ describe('userCommand', () => {

expect(getUser).toHaveBeenCalledWith('valid-token', 'eu')
expect(konsola.ok).toHaveBeenCalledWith(
`Hi: ${chalk.bold('John Doe')}, you current logged in with: ${chalk.hex('#45bfb9')(mockResponse.user.email)} on region: ${chalk.bold('eu')}`,
`Hi ${chalk.bold('John Doe')}, you are currently logged in with ${chalk.hex('#45bfb9')(mockResponse.user.email)} on ${chalk.bold('eu')} region`,
)
})

Expand Down
2 changes: 1 addition & 1 deletion src/commands/user/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const userCommand = program
try {
const { password, region } = state as NetrcMachine
const { user } = await getUser(password, region)
konsola.ok(`Hi: ${chalk.bold(user.friendly_name)}, you current logged in with: ${chalk.hex('#45bfb9')(user.email)} on region: ${chalk.bold(region)}`)
konsola.ok(`Hi ${chalk.bold(user.friendly_name)}, you are currently logged in with ${chalk.hex('#45bfb9')(user.email)} on ${chalk.bold(region)} region`)
}
catch (error) {
handleError(error as Error, true)
Expand Down

0 comments on commit 55e8efd

Please sign in to comment.