Skip to content

Commit

Permalink
fixed from exists to exist (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
Makoto1021 authored Jun 5, 2024
1 parent e6304df commit c31dd8d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Casks/redis-stack-server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
end
binaries.each { |item|
dest = "#{basepath}/bin/#{item}"
if File.exists?(dest)
if File.exist?(dest)
if File.readlink(dest).include?("redis-stack")
File.delete(dest)
end
Expand All @@ -56,21 +56,21 @@
end

confdir = "#{basepath}/etc"
if !Dir.exists?(confdir)
if !Dir.exist?(confdir)
FileUtils.mkdir(confdir)
end

conffile = "#{confdir}/redis-stack.conf"
src = "#{caskroom_path}/#{version}/etc/redis-stack.conf"
if !File.exists?(conffile)
if !File.exist?(conffile)
FileUtils.cp(src, conffile)
end

caskbase = "#{caskroom_path}/#{version}"
# link binaries
binaries.each { |item|
dest = "#{basepath}/bin/#{item}"
if !File.exists?(dest)
if !File.exist?(dest)
File.symlink("#{caskbase}/bin/#{item}", dest)
end
}
Expand Down

0 comments on commit c31dd8d

Please sign in to comment.