Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

Commit

Permalink
Disable auto login for account. Fix #2258
Browse files Browse the repository at this point in the history
  • Loading branch information
timsuchanek committed Jun 5, 2018
1 parent 42bed3e commit 426a4cf
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions cli/packages/prisma-cli-core/src/commands/account/account.ts
@@ -1,15 +1,21 @@
import { Command, flags, Flags } from 'prisma-cli-engine'
import chalk from 'chalk'

export default class Account extends Command {
static topic = 'account'
static description = 'Display account information'
static group = 'platform'
async run() {
await this.client.ensureAuth()
const account = await this.client.getAccount()
try {
const account = await this.client.getAccount()

this.out.log(`\
this.out.log(`\
Email: ${account!.login[0].email}
Name: ${account!.name}`)
} catch (e) {
this.out.log(
`Currently not logged in. Run ${chalk.cyan('prisma login')} to login.`,
)
}
}
}

0 comments on commit 426a4cf

Please sign in to comment.