mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 10:57:04 +08:00
DEV: Be more lenient in CLI confirmation (#16290)
If someone types `yes` rather than `YES`, continue anyway. The chance of typing `yes`, when you actually want to stop, is non-existent. The chance of typing `yes` when you meant `YES` is high, and it's very frustrating when the script quite because you got the case wrong!
This commit is contained in:
parent
6eb3d658ca
commit
d81359246a
|
@ -45,7 +45,7 @@ class DiscourseCLI < Thor
|
|||
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]
|
||||
text = STDIN.gets
|
||||
if text.strip != "YES"
|
||||
if text.strip.upcase != "YES"
|
||||
puts "aborting."
|
||||
exit 1
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue
Block a user