Example #1
0
 /**
  * @param string $command
  * @param array  $arguments
  * @return string
  */
 public function buildCommand($command, array $arguments = [])
 {
     array_unshift($arguments, $command);
     $bin = $this->config->getGitBin();
     $builder = ProcessBuilder::create($arguments);
     $builder->setPrefix($bin);
     $cmd = $builder->getProcess()->getCommandLine();
     $cmd = 'cd ' . $this->getRepositoryPath() . ' && ' . $cmd;
     return $cmd;
 }