Checks process execution
parent
2fd17ecff8
commit
3b22791059
|
@ -34,12 +34,13 @@ abstract class BaseArchiver implements ArchiverInterface
|
||||||
$phar = new \PharData($target, null, null, $format);
|
$phar = new \PharData($target, null, null, $format);
|
||||||
$phar->buildFromDirectory($sources);
|
$phar->buildFromDirectory($sources);
|
||||||
} catch (\UnexpectedValueException $e) {
|
} catch (\UnexpectedValueException $e) {
|
||||||
throw new \RuntimeException(
|
$message = sprintf("Could not create archive '%s' from '%s': %s",
|
||||||
sprintf("Could not create archive '%s' from '%s': %s",
|
|
||||||
$target,
|
$target,
|
||||||
$sources,
|
$sources,
|
||||||
$e->getMessage()
|
$e->getMessage()
|
||||||
));
|
);
|
||||||
|
|
||||||
|
throw new \RuntimeException($message, $e->getCode(), $e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,13 @@ class GitArchiver extends VcsArchiver
|
||||||
$sourceRef
|
$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)
|
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…
Reference in New Issue