Skip to content

Commit 7f433aa

Browse files
committed
Fix socket address not being updated properly
Signed-off-by: apostasie <[email protected]>
1 parent 300a705 commit 7f433aa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmd/nerdctl/compose/compose_cp.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,15 @@ func composeCopyAction(cmd *cobra.Command, args []string) error {
7171
if err != nil {
7272
return err
7373
}
74-
address := globalOptions.Address
74+
7575
// rootless cp runs in the host namespaces, so the address is different
7676
if rootlessutil.IsRootless() {
77-
address, err = rootlessutil.RootlessContainredSockAddress()
77+
globalOptions.Address, err = rootlessutil.RootlessContainredSockAddress()
7878
if err != nil {
7979
return err
8080
}
8181
}
82-
client, ctx, cancel, err := clientutil.NewClient(cmd.Context(), globalOptions.Namespace, address)
82+
client, ctx, cancel, err := clientutil.NewClient(cmd.Context(), globalOptions.Namespace, globalOptions.Address)
8383
if err != nil {
8484
return err
8585
}

0 commit comments

Comments
 (0)