Skip to content
This repository was archived by the owner on Jul 24, 2020. It is now read-only.

Commit d263763

Browse files
committed
Setup script for initial user now doesn't echo the typed password
closes #1265
1 parent b01000c commit d263763

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

db/seeds.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def prompt_field(obj, field)
107107

108108
def prompt_password(user)
109109
puts 'Temp Password:'
110-
user.password = STDIN.gets.chomp
110+
user.password = STDIN.noecho(&:gets).chomp
111111
user.password_confirmation = user.password
112112
begin
113113
user.save!

lib/tasks/setup_application.rake

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ namespace :app do
4141
else
4242
username = email
4343
puts 'Password:'
44-
password = STDIN.gets.chomp
44+
password = STDIN.noecho(&:gets).chomp
4545
puts 'Confirm Password:'
46-
password_confirmation = STDIN.gets.chomp
46+
password_confirmation = STDIN.noecho(&:gets).chomp
4747
end
4848
puts 'Affiliation (i.e. Yale College):'
4949
affiliation = STDIN.gets.chomp

0 commit comments

Comments
 (0)