diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c71e326..b6d60fdb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,14 +5,18 @@ ### Added - Added a description to the autocomplete command [#1472] -- Log unhandled exceptions into logfile [#1481] +- Added logging of unhandled exceptions into logfile [#1481] +- Added missing {{bin/php}} in deploy:vendors [#1521] ### Fixed -- 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] -- Update silverstripe recipe to support silverstripe 4 +- Fixed within() to also restore the working-path when the given callback throws a Exception [#1463] +- Fixed `pcntl_fork` check for blacklisted Ubuntu LTS boxes [#1476] + +### Changed +- Throw meaningfull exception on errors in cd() [#1480] - Make sure Context::pop() is called when Callback errors in on(...) function [#1513] -- Added missing {{bin/php}} in deploy:vendors [#1521] +- Update silverstripe recipe to support silverstripe 4 + ## v6.0.5 [v6.0.4...v6.0.5](https://github.com/deployphp/deployer/compare/v6.0.4...v6.0.5) @@ -346,9 +350,11 @@ - Fixed typo3 recipe - Fixed remove of shared dir on first deploy + [#1521]: https://github.com/deployphp/deployer/pull/1521 [#1513]: https://github.com/deployphp/deployer/pull/1513 [#1481]: https://github.com/deployphp/deployer/issues/1481 +[#1480]: https://github.com/deployphp/deployer/issues/1480 [#1476]: https://github.com/deployphp/deployer/pull/1476 [#1472]: https://github.com/deployphp/deployer/pull/1472 [#1463]: https://github.com/deployphp/deployer/pull/1463 diff --git a/src/functions.php b/src/functions.php index 376dea03..12756a95 100644 --- a/src/functions.php +++ b/src/functions.php @@ -7,6 +7,7 @@ namespace Deployer; +use Deployer\Exception\RuntimeException; use Deployer\Host\FileLoader; use Deployer\Host\Host; use Deployer\Host\Localhost; @@ -246,7 +247,11 @@ function option($name, $shortcut = null, $mode = null, $description = '', $defau */ function cd($path) { - set('working_path', parse($path)); + try { + set('working_path', parse($path)); + } catch (RuntimeException $e) { + throw new \Exception('Unable to change directory into "'. $path .'"', 0, $e); + } } /**