Skip to content

Commit b44314d

Browse files
committed
Remove session:switch command suggestion when not relevant in the login command
1 parent 9d6cd95 commit b44314d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Command/CommandBase.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,9 @@ public function login()
381381
if ($this->output && $this->input && $this->input->isInteractive()) {
382382
if ($this->config()->getSessionId() !== 'default' || count($this->api()->listSessionIds()) > 1) {
383383
$this->stdErr->writeln(sprintf('The current session ID is: <info>%s</info>', $this->config()->getSessionId()));
384-
$this->stdErr->writeln(sprintf('To switch sessions, run: <info>%s session:switch</info>', $this->config()->get('application.executable')));
384+
if (!$this->config()->isSessionIdFromEnv()) {
385+
$this->stdErr->writeln(sprintf('To switch sessions, run: <info>%s session:switch</info>', $this->config()->get('application.executable')));
386+
}
385387
$this->stdErr->writeln('');
386388
}
387389

0 commit comments

Comments
 (0)