File tree 1 file changed +8
-4
lines changed
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -107,12 +107,14 @@ pub(crate) fn update_llvm_submodule(build: &Build) {
107
107
}
108
108
109
109
// check_submodule
110
+ let buf;
110
111
let checked_out = if build. config . fast_submodules {
111
- Some ( output (
112
+ buf = output (
112
113
Command :: new ( "git" )
113
114
. args ( & [ "rev-parse" , "HEAD" ] )
114
115
. current_dir ( build. config . src . join ( llvm_project) ) ,
115
- ) )
116
+ ) ;
117
+ Some ( buf. trim_end ( ) )
116
118
} else {
117
119
None
118
120
} ;
@@ -124,8 +126,10 @@ pub(crate) fn update_llvm_submodule(build: &Build) {
124
126
. arg ( llvm_project)
125
127
. current_dir ( & build. config . src ) ,
126
128
) ;
127
- let hash =
128
- recorded. split ( ' ' ) . nth ( 2 ) . unwrap_or_else ( || panic ! ( "unexpected output `{}`" , recorded) ) ;
129
+ let hash = recorded
130
+ . split_whitespace ( )
131
+ . nth ( 2 )
132
+ . unwrap_or_else ( || panic ! ( "unexpected output `{}`" , recorded) ) ;
129
133
130
134
// update_submodule
131
135
if let Some ( llvm_hash) = checked_out {
You can’t perform that action at this time.
0 commit comments