Skip to content

Commit c670e6e

Browse files
committed
Remove unnecessary executable bit form docker-entrypoint.tt
The docker-entrypoint.tt template doesn't require the executable permission bit as it isn't executed on its own. It's rendered file "bin/docker-entrypoint" does require the executable bit which continues to be set in AppBuilder#dockerfiles.
1 parent 34ebdf9 commit c670e6e

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

railties/lib/rails/generators/rails/app/templates/docker-entrypoint.tt

100755100644
File mode changed.

railties/test/generators/api_app_generator_test.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ def test_skeleton_is_created
3030

3131
default_files.each { |path| assert_file path }
3232
skipped_files.each { |path| assert_no_file path }
33+
34+
absolute = File.expand_path("bin/docker-entrypoint", destination_root)
35+
assert File.executable?(absolute)
3336
end
3437

3538
def test_api_modified_files

railties/test/generators/shared_generator_tests.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ def test_codebase_is_created
7979

8080
default_files.each { |path| assert_file path }
8181

82+
if default_files.include?("bin/docker-entrypoint")
83+
assert File.executable?("#{application_path}/bin/docker-entrypoint")
84+
end
85+
8286
assert_file "#{application_path}/config/application.rb", /\s+require\s+["']rails\/all["']/
8387

8488
assert_file "#{application_path}/config/environments/development.rb" do |content|

0 commit comments

Comments
 (0)