提交 ff7ec79e 编写于 作者: K Kasper Timm Hansen

Access EDITOR through Ruby's cross-platform ENV.

Fix the mistake of not using Ruby's ENV hash from the get go and get
windows support.
上级 428090d6
......@@ -31,7 +31,7 @@ def edit
require_application_and_environment!
Rails::Secrets.read_for_editing do |tmp_path|
system("\$EDITOR #{tmp_path}")
system("#{ENV["EDITOR"]} #{tmp_path}")
end
say "New secrets encrypted and saved."
......@@ -43,7 +43,7 @@ def edit
raise unless error.message =~ /secrets\.yml\.enc/
Rails::Secrets.read_template_for_editing do |tmp_path|
system("\$EDITOR #{tmp_path}")
system("#{ENV["EDITOR"]} #{tmp_path}")
generator.skip_secrets_file { setup }
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册