diff --git a/system/src/Grav/Console/Cli/InstallCommand.php b/system/src/Grav/Console/Cli/InstallCommand.php index 31f011691..363555647 100644 --- a/system/src/Grav/Console/Cli/InstallCommand.php +++ b/system/src/Grav/Console/Cli/InstallCommand.php @@ -109,10 +109,18 @@ class InstallCommand extends ConsoleCommand $this->output->writeln(''); foreach ($this->config['git'] as $repo => $data) { + $this->destination = rtrim($this->destination, DS); $path = $this->destination . DS . $data['path']; if (!file_exists($path)) { - exec('cd "' . $this->destination . '" && git clone -b ' . $data['branch'] . ' ' . $data['url'] . ' ' . $data['path']); - $this->output->writeln('SUCCESS cloned ' . $data['url'] . ' -> ' . $path . ''); + exec('cd "' . $this->destination . '" && git clone -b ' . $data['branch'] . ' ' . $data['url'] . ' ' . $data['path'], $output, $return); + + if (!$return) { + $this->output->writeln('SUCCESS cloned ' . $data['url'] . ' -> ' . $path . ''); + } else { + $this->output->writeln('ERROR cloning ' . $data['url']); + + } + $this->output->writeln(''); } else { $this->output->writeln('' . $path . ' already exists, skipping...');