1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

~/.pry_history should not be world-readable

This commit is contained in:
Kohei Suzuki 2013-05-26 18:53:32 +09:00
parent 1414c94b26
commit d1e2c7f0ae

View file

@ -103,7 +103,7 @@ class Pry
if defined?(@history_file) if defined?(@history_file)
@history_file @history_file
else else
@history_file = File.open(file_path, 'a').tap { |f| f.sync = true } @history_file = File.open(file_path, 'a', 0600).tap { |f| f.sync = true }
end end
rescue Errno::EACCES rescue Errno::EACCES
warn 'History not saved; unable to open your history file for writing.' warn 'History not saved; unable to open your history file for writing.'