mirror of
https://github.com/clearlinux/docker.git
synced 2026-08-20 20:56:42 +00:00
Display error if resource not specified
Display an error message if a container resource is not supplied to 'docker cp'. Fixes error in #1661
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