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 ,
@@ -328,7 +329,7 @@ fn copy_container_to_rootfs(
328
329
// us
329
330
let old_path_bytes = entry. path_bytes ( ) . to_vec ( ) ;
330
331
let old_path = UnixPath :: new ( old_path_bytes. as_ref ( ) as & [ u8 ] ) ;
331
- let old_path_relative = old_path. strip_prefix ( "/" ) ? ;
332
+ let old_path_relative = old_path. strip_prefix ( "/" ) . unwrap_or ( & old_path ) ;
332
333
let new_path = root_path. join ( old_path_relative) ;
333
334
let new_path_std = new_path. try_as_ref ( ) . context ( format ! (
334
335
"failed to convert unix path to os path: {new_path:?}"
@@ -372,7 +373,7 @@ fn copy_container_to_rootfs(
372
373
let old_link = UnixPath :: new ( old_link. as_ref ( ) as & [ u8 ] ) ;
373
374
374
375
if old_link. is_absolute ( ) {
375
- let old_link_relative = old_link. strip_prefix ( "/" ) ? ;
376
+ let old_link_relative = old_link. strip_prefix ( "/" ) . unwrap_or ( & old_link ) ;
376
377
let new_link = root_path. join ( old_link_relative) ;
377
378
let new_link_std = new_link. try_as_ref ( ) . context ( format ! (
378
379
"failed to convert unix path to os path: {new_link:?}"
You can’t perform that action at this time.
0 commit comments