mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user