Skip to content

Allow oc cp to Copy a Single File to a Directory #29334

Open
@thekief

Description

Tools similar to oc, such as adb, that allow to copy file from a remote, offer to copy single file without needing to specify a destination and allow to, e.g. just provide a target directory, such as ..

It would be a nice quality-of-life improvement to have something similar implemented.

Version

Client Version: 4.17.5
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Kubernetes Version: v1.27.15+6147456

Steps To Reproduce
  1. execute oc cp <pod name>:<path to a single file> .
Current Result
tar: Removing leading `/' from member names
error: open .: is a directory
Expected Result

The file is copied to the current directory.

Additional Information

n/a

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions