File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -173,21 +173,30 @@ pub fn scripted_fixture_repo_read_only_with_args(
173
173
. env ( "GIT_CONFIG_VALUE_1" , "main" )
174
174
. output ( ) ?;
175
175
if !output. status . success ( ) {
176
- std :: fs :: write ( failure_marker , & [ ] ) . ok ( ) ;
176
+ write_failure_marker ( & failure_marker ) ;
177
177
}
178
178
assert ! (
179
179
output. status. success( ) ,
180
180
"repo script failed: stdout: {}\n stderr: {}" ,
181
181
output. stdout. as_bstr( ) ,
182
182
output. stderr. as_bstr( )
183
183
) ;
184
- create_archive_if_not_on_ci ( & script_result_directory, & archive_file_path, script_identity) ?;
184
+ create_archive_if_not_on_ci ( & script_result_directory, & archive_file_path, script_identity) . map_err (
185
+ |err| {
186
+ write_failure_marker ( & failure_marker) ;
187
+ err
188
+ } ,
189
+ ) ?;
185
190
}
186
191
}
187
192
}
188
193
Ok ( script_result_directory)
189
194
}
190
195
196
+ fn write_failure_marker ( failure_marker : & Path ) {
197
+ std:: fs:: write ( failure_marker, & [ ] ) . ok ( ) ;
198
+ }
199
+
191
200
/// The `script_identity` will be baked into the soon to be created `archive` as it identitifies the script
192
201
/// that created the contents of `source_dir`.
193
202
fn create_archive_if_not_on_ci ( source_dir : & Path , archive : & Path , script_identity : u32 ) -> std:: io:: Result < ( ) > {
You can’t perform that action at this time.
0 commit comments