diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2017-03-02 07:54:53 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2017-03-02 19:08:15 +0900 |
commit | 3279394c45dadb5ae33ce5c2af0018a36009830b (patch) | |
tree | 7ee47989e254c660c611fd19d3a7250e651389c7 /railties/lib | |
parent | 22e33e464c81167633c7d1e5aac3b9dd4bf5fc1f (diff) | |
download | rails-3279394c45dadb5ae33ce5c2af0018a36009830b.tar.gz rails-3279394c45dadb5ae33ce5c2af0018a36009830b.tar.bz2 rails-3279394c45dadb5ae33ce5c2af0018a36009830b.zip |
Convert `ENV["EDITOR"]` to string before check
In order to avoid `NoMethodError` when it is nil.
Follow up to 82f7dc6178f86e5e2dd82f9e528475a6acee6cd8
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/commands/secrets/secrets_command.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/commands/secrets/secrets_command.rb b/railties/lib/rails/commands/secrets/secrets_command.rb index 65db81ac73..b9ae5d8b3b 100644 --- a/railties/lib/rails/commands/secrets/secrets_command.rb +++ b/railties/lib/rails/commands/secrets/secrets_command.rb @@ -18,7 +18,7 @@ module Rails end def edit - if ENV["EDITOR"].empty? + if ENV["EDITOR"].to_s.empty? say "No $EDITOR to open decrypted secrets in. Assign one like this:" say "" say %(EDITOR="mate --wait" bin/rails secrets:edit) |