protected function execute(InputInterface $input, OutputInterface $output)
 {
     $this->quoptparse($input, $output, $this->guessShopSettings('.'), $input->getOption('accept_defaults'));
     $conf = new ConfigurationFile('pstaf.conf.json');
     $conf->update(['shop' => $this->getOptions()])->save();
 }
 public function updateRepo()
 {
     $conf = new ConfigurationFile($this->configuration_file_path);
     $repo = $conf->getAsAbsolutePath('shop.filesystem_path');
     if (0 !== (new Process('git', ['status']))->setWorkingDir($repo)->run(null, null, null, ['wait' => true])) {
         echo "Not a github repository: {$repo}, so not updating.\n";
     } else {
         $pulled = (new Process('git', ['pull']))->setWorkingDir($repo)->run(null, STDOUT, STDERR, ['wait' => true]);
         if ($pulled === 0) {
             echo "Successfully updated repo!\n";
         } else {
             echo "Could not update repository, please check manually.\n";
         }
     }
 }
 public static function getFromCWD()
 {
     $conf = ConfigurationFile::getFromCWD();
     $shop = new Shop('.', $conf->get('shop'), SeleniumManager::getMyPort());
     return $shop;
 }