1
0
Fork 0

Checks process execution

pull/1567/head
Matthieu Moquet 2012-08-27 10:59:30 +02:00 committed by Nils Adermann
parent 2fd17ecff8
commit 3b22791059
3 changed files with 21 additions and 8 deletions

View File

@ -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);
}
}
}

View File

@ -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)
);
}
}
/**

View File

@ -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)
);
}
}
/**