(cmd *cobra.Command, args []string)
| 62 | } |
| 63 | |
| 64 | func copyAction(cmd *cobra.Command, args []string) error { |
| 65 | options, err := copyOptions(cmd, args) |
| 66 | if err != nil { |
| 67 | return err |
| 68 | } |
| 69 | if rootlessutil.IsRootless() { |
| 70 | options.GOptions.Address, err = rootlessutil.RootlessContainredSockAddress() |
| 71 | if err != nil { |
| 72 | return err |
| 73 | } |
| 74 | } |
| 75 | client, ctx, cancel, err := clientutil.NewClient(cmd.Context(), options.GOptions.Namespace, options.GOptions.Address) |
| 76 | if err != nil { |
| 77 | return err |
| 78 | } |
| 79 | defer cancel() |
| 80 | |
| 81 | return container.Cp(ctx, client, options) |
| 82 | } |
| 83 | |
| 84 | func copyOptions(cmd *cobra.Command, args []string) (types.ContainerCpOptions, error) { |
| 85 | globalOptions, err := helpers.ProcessRootCmdFlags(cmd) |
nothing calls this directly
no test coverage detected
searching dependent graphs…