mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 08:43:25 +08:00
FIX: discourse remap: fix output to avoid UX issue (#24905)
Before this commit, this output is possible: ``` Rewriting all occurrences of STRING1 to STRING2 THIS TASK WILL REWRITE DATA, ARE YOU SURE (type YES) WILL RUN ON ALL 1 DBS ``` Which, when run from a script, might lead one to believe that YES was automatically inserted into STDIN and the script is continuing. Turns out this isn't the case so the obvious expectation is broken. This commit swaps the order of those last lines to make it clear that the script is blocked on input.
This commit is contained in:
parent
ca3792221a
commit
5417c4fac0
|
@ -42,8 +42,8 @@ class DiscourseCLI < Thor
|
|||
else
|
||||
puts "Rewriting all occurrences of #{from} to #{to}"
|
||||
end
|
||||
puts "THIS TASK WILL REWRITE DATA, ARE YOU SURE (type YES)"
|
||||
puts "WILL RUN ON ALL #{RailsMultisite::ConnectionManagement.all_dbs.length} DBS" if options[:global]
|
||||
puts "THIS TASK WILL REWRITE DATA, ARE YOU SURE (type YES)"
|
||||
text = STDIN.gets
|
||||
if text.strip.upcase != "YES"
|
||||
puts "aborting."
|
||||
|
|
Loading…
Reference in New Issue
Block a user