mirror of
https://github.com/clearlinux/docker.git
synced 2026-08-22 05:56:17 +00:00
Merge pull request #1663 from KSid/1661-cp-parsing-error
- Runtime: Display error if docker cp resource not specified
This commit is contained in:
@@ -1532,6 +1532,10 @@ func (cli *DockerCli) CmdCp(args ...string) error {
|
||||
var copyData APICopy
|
||||
info := strings.Split(cmd.Arg(0), ":")
|
||||
|
||||
if len(info) != 2 {
|
||||
return fmt.Errorf("Error: Resource not specified")
|
||||
}
|
||||
|
||||
copyData.Resource = info[1]
|
||||
copyData.HostPath = cmd.Arg(1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user