mirror of
https://github.com/deployphp/deployer.git
synced 2025-02-23 00:32:25 +01:00
Trim instead of error
This commit is contained in:
parent
b724073157
commit
94a2e7ab6c
@ -5,9 +5,9 @@ desc('Copy directories');
|
||||
task('deploy:copy_dirs', function () {
|
||||
if (has('previous_release')) {
|
||||
foreach (get('copy_dirs') as $dir) {
|
||||
if (substr($dir, -1) === '/') {
|
||||
throw new \RuntimeException('Entries in config parameter "copy_dirs" must not end with "/"');
|
||||
}
|
||||
// Make sure all path without tailing slash.
|
||||
$dir = trim($dir, '/');
|
||||
|
||||
if (test("[ -d {{previous_release}}/$dir ]")) {
|
||||
$destinationDir = '';
|
||||
if (strpos($dir, '/') !== false) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user