File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
packages/toolchain/toolchain/src/util/docker Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -105,6 +105,7 @@ async fn archive_oci_bundle(
105
105
cmd : Option < Vec < String > > ,
106
106
entrypoint : Option < Vec < String > > ,
107
107
env : Vec < String > ,
108
+ #[ serde( default ) ]
108
109
user : String ,
109
110
#[ serde( default ) ]
110
111
working_dir : String ,
@@ -327,7 +328,7 @@ fn copy_container_to_rootfs(
327
328
// us
328
329
let old_path_bytes = header. path_bytes ( ) ;
329
330
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 ) ;
331
332
let new_path = root_path. join ( old_path_relative) ;
332
333
let new_path_std = new_path. try_as_ref ( ) . context ( format ! (
333
334
"failed to convert unix path to os path: {new_path:?}"
@@ -371,7 +372,7 @@ fn copy_container_to_rootfs(
371
372
let old_link = UnixPath :: new ( old_link. as_ref ( ) as & [ u8 ] ) ;
372
373
373
374
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 ) ;
375
376
let new_link = root_path. join ( old_link_relative) ;
376
377
let new_link_std = new_link. try_as_ref ( ) . context ( format ! (
377
378
"failed to convert unix path to os path: {new_link:?}"
You can’t perform that action at this time.
0 commit comments