Fail hard when failing to download using hg
parent
7cb79bb1c9
commit
5be7f4cf09
|
@ -29,7 +29,10 @@ class HgDownloader extends VcsDownloader
|
|||
$ref = escapeshellarg($package->getSourceReference());
|
||||
$path = escapeshellarg($path);
|
||||
$this->io->write(" Cloning ".$package->getSourceReference());
|
||||
$this->process->execute(sprintf('hg clone %s %s && cd %2$s && hg up %s', $url, $path, $ref), $ignoredOutput);
|
||||
$command = sprintf('hg clone %s %s && cd %2$s && hg up %s', $url, $path, $ref);
|
||||
if (0 !== $this->process->execute($command, $ignoredOutput)) {
|
||||
throw new \RuntimeException('Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -41,7 +44,10 @@ class HgDownloader extends VcsDownloader
|
|||
$ref = escapeshellarg($target->getSourceReference());
|
||||
$path = escapeshellarg($path);
|
||||
$this->io->write(" Updating to ".$target->getSourceReference());
|
||||
$this->process->execute(sprintf('cd %s && hg pull %s && hg up %s', $path, $url, $ref), $ignoredOutput);
|
||||
$command = sprintf('cd %s && hg pull %s && hg up %s', $path, $url, $ref);
|
||||
if (0 !== $this->process->execute($command, $ignoredOutput)) {
|
||||
throw new \RuntimeException('Failed to execute ' . $command . "\n\n" . $this->process->getErrorOutput());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue