File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -176,7 +176,6 @@ async fn extract_rename(
176
176
async fn extract_archive (
177
177
chal : & ChallengeConfig ,
178
178
container : & docker:: ContainerInfo ,
179
- // files: &Vec<PathBuf>,
180
179
files : & [ PathBuf ] ,
181
180
archive_name : & Path ,
182
181
) -> Result < Vec < PathBuf > > {
@@ -203,7 +202,7 @@ async fn extract_archive(
203
202
// archive_name already has the chal dir prepended
204
203
zip_files ( archive_name, & copied_files) ?;
205
204
206
- Ok ( vec ! [ chal . directory . join ( archive_name ) ] )
205
+ Ok ( vec ! [ archive_name . to_path_buf ( ) ] )
207
206
}
208
207
209
208
/// Add multiple local `files` to a zipfile at `zip_name`
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ async fn build_challenge(
138
138
139
139
// extract each challenge provide entry
140
140
// this handles both local files and from build containers
141
- let extracted_files = chal
141
+ built . assets = chal
142
142
. provide
143
143
. iter ( )
144
144
. map ( |p| async {
@@ -152,7 +152,11 @@ async fn build_challenge(
152
152
} )
153
153
} )
154
154
. try_join_all ( )
155
- . await ?;
155
+ . await ?
156
+ // flatten to single vec of all paths
157
+ . into_iter ( )
158
+ . flatten ( )
159
+ . collect_vec ( ) ;
156
160
157
161
info ! ( "extracted artifacts: {:?}" , built. assets) ;
158
162
}
You can’t perform that action at this time.
0 commit comments