Replies: 1 comment
-
Not sure why this issue was converted to a discussion as it seems to be an actual bug in the way rsync arguments are escaped. Workaround:
Some clarification of this behaviour by rsync: https://superuser.com/questions/1418666/fish-generated-rsync-command-has-unexpected-effects#1418675 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
(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').Beta Was this translation helpful? Give feedback.
All reactions