File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Library/Homebrew/extend/os/linux Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -34,8 +34,12 @@ def default_compiler = :gcc
34
34
def needs_libc_formula?
35
35
return @needs_libc_formula unless @needs_libc_formula . nil?
36
36
37
- @needs_libc_formula = T . let ( OS ::Linux ::Glibc . below_ci_version? , T . nilable ( T ::Boolean ) )
38
- @needs_libc_formula = !!@needs_libc_formula
37
+ @needs_libc_formula = T . let ( nil , T . nilable ( T ::Boolean ) )
38
+
39
+ # Undocumented environment variable to make it easier to test libc
40
+ # formula automatic installation.
41
+ @needs_libc_formula = true if ENV [ "HOMEBREW_FORCE_LIBC_FORMULA" ]
42
+ @needs_libc_formula ||= OS ::Linux ::Glibc . below_ci_version?
39
43
end
40
44
41
45
# Keep this method around for now to make it easier to add this functionality later.
@@ -52,7 +56,12 @@ def needs_compiler_formula?
52
56
return @needs_compiler_formula unless @needs_compiler_formula . nil?
53
57
54
58
@needs_compiler_formula = T . let ( nil , T . nilable ( T ::Boolean ) )
55
- @needs_compiler_formula = if host_gcc_path . exist?
59
+
60
+ # Undocumented environment variable to make it easier to test compiler
61
+ # formula automatic installation.
62
+ @needs_compiler_formula = true if ENV [ "HOMEBREW_FORCE_COMPILER_FORMULA" ]
63
+
64
+ @needs_compiler_formula ||= if host_gcc_path . exist?
56
65
::DevelopmentTools . gcc_version ( host_gcc_path . to_s ) < OS ::LINUX_GCC_CI_VERSION
57
66
else
58
67
true
You can’t perform that action at this time.
0 commit comments