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('');
}