redis: fixed redis.conf rename false positive.

Closes Homebrew/homebrew#16239.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Chad Catlett 2012-11-26 07:16:56 -06:00 committed by Mike McQuaid
parent 970535db8d
commit 2c88d9a359

View file

@ -31,7 +31,7 @@ class Redis < Formula
end
# Fix redis upgrade from 2.4 to 2.6.
if File.exists?(etc/'redis.conf') && File.readlines(etc/'redis.conf').grep(/^vm-enabled/)
if File.exists?(etc/'redis.conf') && !File.readlines(etc/'redis.conf').grep(/^vm-enabled/).empty?
mv etc/'redis.conf', etc/'redis.conf.old'
ohai "Your redis.conf will not work with 2.6; moved it to redis.conf.old"
end