File tree Expand file tree Collapse file tree 1 file changed +16
-12
lines changed Expand file tree Collapse file tree 1 file changed +16
-12
lines changed Original file line number Diff line number Diff line change @@ -111,19 +111,23 @@ hermetic_python_version = parsed_args["hermetic_python_version"]
111
111
112
112
# Try to guess if `cc` is GCC and get its version number.
113
113
cc_is_gcc, gcc_version = let
114
- io = IOBuffer ()
115
- run (pipeline (ignorestatus (` $(cc) --version` ); stdout = io))
116
- version_string = String (take! (io))
117
- # Detecing GCC is hard, the name "gcc" may not appear anywhere in the
118
- # version string, but on the second line there should be FSF.
119
- m = match (
120
- r" \( [^)]+\) (\d +\.\d +\.\d +).*\n .*Free Software Foundation, Inc\. " ,
121
- version_string,
122
- )
123
- if ! isnothing (m)
124
- true , VersionNumber (m[1 ])
125
- else
114
+ if isempty (cc)
126
115
false , v " 0"
116
+ else
117
+ io = IOBuffer ()
118
+ run (pipeline (ignorestatus (` $(cc) --version` ); stdout = io))
119
+ version_string = String (take! (io))
120
+ # Detecing GCC is hard, the name "gcc" may not appear anywhere in the
121
+ # version string, but on the second line there should be FSF.
122
+ m = match (
123
+ r" \( [^)]+\) (\d +\.\d +\.\d +).*\n .*Free Software Foundation, Inc\. " ,
124
+ version_string,
125
+ )
126
+ if ! isnothing (m)
127
+ true , VersionNumber (m[1 ])
128
+ else
129
+ false , v " 0"
130
+ end
127
131
end
128
132
end
129
133
You can’t perform that action at this time.
0 commit comments