public function login() { if (!$this->output || !self::$interactive) { throw new LoginRequiredException(); } $exitCode = $this->runOtherCommand('login'); $this->stdErr->writeln(''); if ($exitCode) { throw new \Exception('Login failed'); } }