From a9e6e6c2475fbe4eb33318ff75839cc0f90c2823 Mon Sep 17 00:00:00 2001 From: Leo Lamprecht Date: Fri, 8 Sep 2017 12:34:20 +0200 Subject: [PATCH] Made `now whoami` return the correct team context (#823) --- src/providers/sh/commands/whoami.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/providers/sh/commands/whoami.js b/src/providers/sh/commands/whoami.js index 331728c..3a02e53 100644 --- a/src/providers/sh/commands/whoami.js +++ b/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) }