From b44314d375d2f0652bf70b0ef846558ab6469c4e Mon Sep 17 00:00:00 2001 From: Patrick Dawkins Date: Thu, 25 Jun 2020 14:36:56 +0100 Subject: [PATCH] Remove session:switch command suggestion when not relevant in the login command --- src/Command/CommandBase.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Command/CommandBase.php b/src/Command/CommandBase.php index aa0b330f8..859383567 100644 --- a/src/Command/CommandBase.php +++ b/src/Command/CommandBase.php @@ -381,7 +381,9 @@ public function login() if ($this->output && $this->input && $this->input->isInteractive()) { if ($this->config()->getSessionId() !== 'default' || count($this->api()->listSessionIds()) > 1) { $this->stdErr->writeln(sprintf('The current session ID is: %s', $this->config()->getSessionId())); - $this->stdErr->writeln(sprintf('To switch sessions, run: %s session:switch', $this->config()->get('application.executable'))); + if (!$this->config()->isSessionIdFromEnv()) { + $this->stdErr->writeln(sprintf('To switch sessions, run: %s session:switch', $this->config()->get('application.executable'))); + } $this->stdErr->writeln(''); }