public function handle(InputInterface $input, OutputInterface $output) { $data = []; $helper = $this->command->getHelper('question'); $data['jiraHost'] = $helper->ask($input, $output, new Question('Domain (yourdomain.atlassian.net): ', false)); $data['jiraUser'] = $helper->ask($input, $output, new Question('Username: '******'Password: '******'Confirm Password: '******'Password cannot be blank'); // } // // if ($password !== $password2) { // throw new \RuntimeException('Passwords must match.'); // } $data['jiraPassword'] = $password; if ($this->config->write($data) !== false) { $output->writeln('Config written to file: ' . $this->config->filePath()); } else { $output->writeln('Nothing written..'); } }
public function ensureConfigExists() { if (!$this->config->exists()) { throw new \RuntimeException("Config file found at: " . $this->config->filePath() . "\n" . "Generate Config with: ./slackpipe config:set " . $this->provider . "\n"); } }