You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
upload(): rsync exclude options not recognised due to escaping #3347
(Duplicate/re-opening of #2972, which references introduction of this bug in f4e2d6b)
When calling upload() with --exclude options for rsync, these are escaped via escapeshellarg.
In the case of --exclude, this somehow results in the option not being recognized by rsync: upload('test-dir', '{{release_path}}', ['options' => [ "--exclude={'composer.lock','vendor'}" ]]); upload('test-dir', '{{release_path}}', ['options' => [ "--exclude='vendor'", "--exclude='composer.lock'" ]]); upload('test-dir', '{{release_path}}', ['options' => [ '--exclude="vendor"', '--exclude="composer.lock"' ]]);
Results in run'ing: rsync '-azP' '--exclude={'\''composer.lock'\'','\''vendor'\''}' ...etc rsync '-azP' '--exclude='\''vendor'\''' '--exclude='\''composer.lock'\''' ...etc rsync '-azP' '--exclude="vendor"' '--exclude="composer.lock"' ...etc
...which all three include both composer.lock and vendor dir in the sync instead of being excluded.
Running the same rsync command without 's around the --exclude options, does work correctly...
Also the 's do not seem to cause issues around other arguments, shorthand (eg '-azP') nor longhand (eg '--delete').
Activity