Closed teonimesic closed 11 years ago
I am using sprinkle 0.5.2, and found this error for ruby 2.0.0-p0 and 1.9.3-p392
It also happens with ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]
Also its worth to mention that the verification fails, since the file and the text are actually different.
Can you test against sprinkle master from github?
The same problem occurs on master from github
escape_shell_arg
is messed up but it's used by push_text and replace_text in slightly different ways. Shell escaping isn't my area of expertise.
I bet it's doing the right thing for sed but not for echo?
changing line 94 ( in file lib/sprinkle/installers/installer.rb on version 0.5.2 ) from str.gsub("'", "'\\\\''").gsub("/", "\\\\/").gsub("\n", '\n').gsub('&', '\\\&')
to str.gsub("'", "'\\\\''").gsub("\n", '\n').gsub('&', '\\\&')
(basically removing the second gsub) solves the issue. I guess echo needs to use a different method or something.
Fix should be in master. Confirm?
If you confirm this is good I'll drop sprinkle 0.6.
I've started using sprinkle today, but run into an error when using push_text. Im trying to create a recipe to upload my id_pub to a remote server. the code looks something like this:
The problem is that push_text is ecaping all '/' into '\/', so the final file actually looks like: