Checks process execution

main
Matthieu Moquet 12 years ago committed by Nils Adermann
parent 2fd17ecff8
commit 3b22791059

@ -34,12 +34,13 @@ abstract class BaseArchiver implements ArchiverInterface
$phar = new \PharData($target, null, null, $format);
$phar->buildFromDirectory($sources);
} catch (\UnexpectedValueException $e) {
throw new \RuntimeException(
sprintf("Could not create archive '%s' from '%s': %s",
$target,
$sources,
$e->getMessage()
));
$message = sprintf("Could not create archive '%s' from '%s': %s",
$target,
$sources,
$e->getMessage()
);
throw new \RuntimeException($message, $e->getCode(), $e);
}
}
}

@ -33,7 +33,13 @@ class GitArchiver extends VcsArchiver
$sourceRef
);
$this->process->execute($command, $output, $source);
$exitCode = $this->process->execute($command, $output, $source);
if (0 !== $exitCode) {
throw new \RuntimeException(
sprintf('The command `%s` returned %s', $command, $exitCode)
);
}
}
/**

@ -33,7 +33,13 @@ class MercurialArchiver extends VcsArchiver
escapeshellarg($target)
);
$this->process->execute($command, $output, $source);
$exitCode = $this->process->execute($command, $output, $source);
if (0 !== $exitCode) {
throw new \RuntimeException(
sprintf('The command `%s` returned %s', $command, $exitCode)
);
}
}
/**

Loading…
Cancel
Save