File tree Expand file tree Collapse file tree
packages/toolchain/toolchain/src/util/docker Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -105,6 +105,7 @@ async fn archive_oci_bundle(
105105 cmd : Option < Vec < String > > ,
106106 entrypoint : Option < Vec < String > > ,
107107 env : Vec < String > ,
108+ #[ serde( default ) ]
108109 user : String ,
109110 #[ serde( default ) ]
110111 working_dir : String ,
@@ -327,7 +328,7 @@ fn copy_container_to_rootfs(
327328 // us
328329 let old_path_bytes = header. path_bytes ( ) ;
329330 let old_path = UnixPath :: new ( old_path_bytes. as_ref ( ) as & [ u8 ] ) ;
330- let old_path_relative = old_path. strip_prefix ( "/" ) ? ;
331+ let old_path_relative = old_path. strip_prefix ( "/" ) . unwrap_or ( & old_path ) ;
331332 let new_path = root_path. join ( old_path_relative) ;
332333 let new_path_std = new_path. try_as_ref ( ) . context ( format ! (
333334 "failed to convert unix path to os path: {new_path:?}"
@@ -371,7 +372,7 @@ fn copy_container_to_rootfs(
371372 let old_link = UnixPath :: new ( old_link. as_ref ( ) as & [ u8 ] ) ;
372373
373374 if old_link. is_absolute ( ) {
374- let old_link_relative = old_link. strip_prefix ( "/" ) ? ;
375+ let old_link_relative = old_link. strip_prefix ( "/" ) . unwrap_or ( & old_link ) ;
375376 let new_link = root_path. join ( old_link_relative) ;
376377 let new_link_std = new_link. try_as_ref ( ) . context ( format ! (
377378 "failed to convert unix path to os path: {new_link:?}"
You can’t perform that action at this time.
0 commit comments