def confirm_overwrite
if STDIN.tty? && STDOUT.tty?
say "Chef Solr is already installed in #{config.solr_home_path}"
print "Do you want to overwrite the current install? All existing Solr data will be lost. [y/n] "
unless STDIN.gets =~ /^y/
say "Quitting. Try running this with --noop to see what it will change."
exit 1
end
else
say("ERROR: Chef Solr is already installed in \#{config.solr_home_path} and you did not use the\n--force option. Use --force to overwrite an existing installation in a non-\ninteractive terminal.\n")
exit 1
end
end