diff --git a/entrypoint.php b/entrypoint.php index 35d3931..a072cb4 100755 --- a/entrypoint.php +++ b/entrypoint.php @@ -93,7 +93,11 @@ note($message); exec("git commit --message '$commitMessage'"); - exec('git push --quiet origin ' . $config->getBranch()); + exec('git push --quiet origin ' . $config->getBranch(), $outputLines, $exitCode); + if ($exitCode > 0) { + exec('exit ' . $exitCode); + die(sprintf('Command failed with exit code %s', $exitCode)); + } } else { note('No files to change'); }