mirror of
https://github.com/deployphp/deployer.git
synced 2025-02-24 09:12:51 +01:00
Make sure pop() is called when Callback errors in on(...) function (#1513)
* Make sure pop() is called when Callback errors in on(...) function * Update CHANGELOG.md * Update CHANGELOG.md
This commit is contained in:
parent
55fc698cb5
commit
722b693688
@ -11,6 +11,7 @@
|
|||||||
- fix within() to also restore the working-path when the given callback throws a Exception [#1463]
|
- fix within() to also restore the working-path when the given callback throws a Exception [#1463]
|
||||||
- `pcntl_fork` is blacklisted per default on ubuntu lts boxes. make sure deployer doesnt emit a warning in this case [#1476]
|
- `pcntl_fork` is blacklisted per default on ubuntu lts boxes. make sure deployer doesnt emit a warning in this case [#1476]
|
||||||
- Update silverstripe recipe to support silverstripe 4
|
- Update silverstripe recipe to support silverstripe 4
|
||||||
|
- Make sure Context::pop() is called when Callback errors in on(...) function [#1513]
|
||||||
|
|
||||||
## v6.0.5
|
## v6.0.5
|
||||||
[v6.0.4...v6.0.5](https://github.com/deployphp/deployer/compare/v6.0.4...v6.0.5)
|
[v6.0.4...v6.0.5](https://github.com/deployphp/deployer/compare/v6.0.4...v6.0.5)
|
||||||
@ -344,6 +345,7 @@
|
|||||||
- Fixed typo3 recipe
|
- Fixed typo3 recipe
|
||||||
- Fixed remove of shared dir on first deploy
|
- Fixed remove of shared dir on first deploy
|
||||||
|
|
||||||
|
[#1513]: https://github.com/deployphp/deployer/pull/1513
|
||||||
[#1481]: https://github.com/deployphp/deployer/issues/1481
|
[#1481]: https://github.com/deployphp/deployer/issues/1481
|
||||||
[#1476]: https://github.com/deployphp/deployer/pull/1476
|
[#1476]: https://github.com/deployphp/deployer/pull/1476
|
||||||
[#1472]: https://github.com/deployphp/deployer/pull/1472
|
[#1472]: https://github.com/deployphp/deployer/pull/1472
|
||||||
|
@ -372,9 +372,12 @@ function on($hosts, callable $callback)
|
|||||||
|
|
||||||
foreach ($hosts as $host) {
|
foreach ($hosts as $host) {
|
||||||
if ($host instanceof Host) {
|
if ($host instanceof Host) {
|
||||||
Context::push(new Context($host, $input, $output));
|
try {
|
||||||
$callback($host);
|
Context::push(new Context($host, $input, $output));
|
||||||
Context::pop();
|
$callback($host);
|
||||||
|
} finally {
|
||||||
|
Context::pop();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
throw new \InvalidArgumentException("Function on can iterate only on Host instances.");
|
throw new \InvalidArgumentException("Function on can iterate only on Host instances.");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user