未验证 提交 8157c8a7 编写于 作者: Y Yuji Yaginuma 提交者: GitHub

Merge pull request #31978 from claudiob/don-t-overwrite-master-key

Don't overwrite config/master.key even on --force
......@@ -27,7 +27,9 @@ def add_master_key_file
end
def add_master_key_file_silently(key = nil)
key_file_generator.add_key_file_silently(MASTER_KEY_PATH, key)
unless MASTER_KEY_PATH.exist?
key_file_generator.add_key_file_silently(MASTER_KEY_PATH, key)
end
end
def ignore_master_key_file
......
......@@ -653,10 +653,11 @@ def test_quiet_option
assert_empty output
end
def test_force_option
def test_force_option_overwrites_every_file_except_master_key
run_generator [File.join(destination_root, "myapp")]
output = run_generator [File.join(destination_root, "myapp"), "--force"]
assert_match(/force/, output)
assert_no_match("force config/master.key", output)
end
def test_application_name_with_spaces
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册