1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05: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:
Kawsar Saiyeed 2013-08-25 00:28:36 +01:00
parent c864647721
commit d8a18ea3ae

View file

@ -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)