Browse Source

Made `now whoami` return the correct team context (#823)

master
Leo Lamprecht 7 years ago
committed by GitHub
parent
commit
a9e6e6c247
  1. 9
      src/providers/sh/commands/whoami.js

9
src/providers/sh/commands/whoami.js

@ -62,11 +62,16 @@ module.exports = async ctx => {
}
}
async function whoami({user}) {
async function whoami({user, currentTeam}) {
if (process.stdout.isTTY) {
process.stdout.write('> ')
}
const name = user.username || user.email
let name = user.username || user.email
if (currentTeam) {
name = currentTeam.slug
}
console.log(name)
}

Loading…
Cancel
Save