Make it even more explicit the action is dangerous

We're yelling at the person to make a backup before proceeding.
This commit is contained in:
Pau Perez
2020-03-10 12:23:14 +01:00
parent e1a80edb7e
commit d215c76bc9

View File

@@ -35,10 +35,12 @@ namespace :ofn do
def warn_with_confirmation
message = <<-MSG.strip_heredoc
\n
<%= color('This will permanently change DB contents. Please, make a backup first.', :yellow) %>
<% highlighted_message = "This will permanently change DB contents. Please, make a backup first." %>
<%= color(highlighted_message, :blink, :on_red) %>
Are you sure you want to proceed? (y/N)
MSG
exit unless HighLine.new.agree(message) { |q| q.default = "n" }
exit unless HighLine.new.agree(message) { |q| q.default = "N" }
end
end
end