@@ -484,7 +484,7 @@ impl Redirection {
484484 format ! (
485485 "Failed to execute command `{} {}`" ,
486486 APFS_HELPER ,
487- shlex:: join ( args. iter( ) . copied( ) )
487+ shlex:: try_join ( args. iter( ) . copied( ) ) . unwrap ( ) , // Unwrap OK, we know the args are valid
488488 )
489489 } ) ?;
490490 if output. status . success ( ) {
@@ -551,7 +551,7 @@ impl Redirection {
551551 . with_context ( || {
552552 format ! (
553553 "Failed to execute command `hdiutil {}`" ,
554- shlex:: join ( args. iter( ) . copied( ) )
554+ shlex:: try_join ( args. iter( ) . copied( ) ) . unwrap ( ) , // Unwrap OK, we know the args are valid
555555 )
556556 } ) ?;
557557 if !create_output. status . success ( ) {
@@ -589,7 +589,7 @@ impl Redirection {
589589 . with_context ( || {
590590 format ! (
591591 "Failed to execute command `hdiutil {}`" ,
592- shlex:: join ( args. iter( ) . copied( ) )
592+ shlex:: try_join ( args. iter( ) . copied( ) ) . unwrap ( ) , // Unwrap OK, we know the args are valid
593593 )
594594 } ) ?;
595595 if !attach_output. status . success ( ) {
@@ -713,7 +713,7 @@ impl Redirection {
713713 . with_context ( || {
714714 format ! (
715715 "Failed to execute command `diskutil {}`" ,
716- shlex:: join ( args. iter( ) . copied( ) )
716+ shlex:: try_join ( args. iter( ) . copied( ) ) . unwrap ( ) , // Unwrap OK, we know the args are valid
717717 )
718718 } ) ?;
719719 if !output. status . success ( ) {
0 commit comments