File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -520,11 +520,11 @@ def dockerfile_build_packages
520
520
# how python is installed with the bullseye release. Below
521
521
# is based on debian release included with the Ruby images on
522
522
# Dockerhub.
523
- case Gem . ruby_version
524
- when /^2.7/
525
- bullseye = ruby_version >= "2.7.4"
526
- when /^3.0/
527
- bullseye = ruby_version >= "3.0.2"
523
+ case Gem . ruby_version . to_s
524
+ when /^2\ . 7/
525
+ bullseye = Gem . ruby_version >= "2.7.4"
526
+ when /^3\ . 0/
527
+ bullseye = Gem . ruby_version >= "3.0.2"
528
528
else
529
529
bullseye = true
530
530
end
Original file line number Diff line number Diff line change @@ -1047,6 +1047,17 @@ def test_dockerfile
1047
1047
end
1048
1048
end
1049
1049
1050
+ def test_old_rubies_do_not_use_bullseye_python
1051
+ Gem . stub ( :ruby_version , Gem ::Version . new ( "2.7.0" ) ) do
1052
+ run_generator [ destination_root , "--js=esbuild" ]
1053
+ end
1054
+
1055
+ assert_file "Dockerfile" do |content |
1056
+ assert_match ( /python/ , content )
1057
+ assert_no_match ( /python-is-python3/ , content )
1058
+ end
1059
+ end
1060
+
1050
1061
def test_skip_docker
1051
1062
run_generator [ destination_root , "--skip-docker" ]
1052
1063
You can’t perform that action at this time.
0 commit comments