Certain file names cause rsync to fail
lukaso opened this issue · comments
Here is the error that I received:
/usr/local/bin/docker-osx-dev: eval: line 697: syntax error near unexpected token `('
/usr/local/bin/docker-osx-dev: eval: line 697: `echo /Users/loberhub/projects/chopin/tmp/cache/assets/test/sass/65db60c9644cba966f816d5db92c1f143c45f8b6/(__TEMPLATE__)c'
greadlink: missing operand
Try 'greadlink --help' for more information.
2015-11-11 23:09:47 [ERROR] Internal error: can't sync '/Users/loberhub/projects/chopin/tmp/cache/assets/test/sass/65db60c9644cba966f816d5db92c1f143c45f8b6/(__TEMPLATE__)c' because it doesn't seem to be part of any paths configured for syncing: /Users/loberhub/projects/chopin /Users/loberhub/.ssh/github_docker /Users/loberhub/projects/chopin /Users/loberhub/projects/chopin /Users/loberhub/projects/chopin
Hm, probably a path that needs to be quoted somewhere. Thanks for reporting.
Line 697:
local readonly normalized_path=$(greadlink -m $(eval echo "$path"))
Seems to work when replacing "
with '
:
local readonly normalized_path=$(greadlink -m $(eval echo '$path'))
By the way, I ran docker-osx-dev
through http://www.shellcheck.net/ and there's some easy fixes to do.
Care to send a PR for review?
Seems to work when replacing " with '
I'm not sure I fully understand why. Could you explain?
By the way, I ran docker-osx-dev through http://www.shellcheck.net/ and there's some easy fixes to do.
Neat. Could you file a separate bug for this?
Single quotes keep the shell from interpolating the string: http://wiki.bash-hackers.org/syntax/quoting
Single quotes keep the shell from interpolating the string: http://wiki.bash-hackers.org/syntax/quoting
What do parens get interpolated as?