Escape $ inreplace 'after' parameter
This commit is contained in:
parent
0df406ae4f
commit
3f11c4ab1f
@ -186,6 +186,7 @@ def inreplace(path, before, after)
|
||||
after=after.to_s
|
||||
after.gsub! "\\", "\\\\"
|
||||
after.gsub! "/", "\\/"
|
||||
after.gsub! "$", "\\$"
|
||||
|
||||
# FIXME use proper Ruby for teh exceptions!
|
||||
safe_system "perl", "-pi", "-e", "s/#{before}/#{after}/g", path
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user