mirror of
https://github.com/docker/cli.git
synced 2026-09-24 15:30:10 -05:00
Merge pull request #12222 from chenhanxiao/cp-support-colon
cp: add support for copy filename with ":" Upstream-commit: 75b911eb3cb12e4c4d86fd42aa12bc71458f77b1 Component: engine
This commit is contained in:
@@ -21,7 +21,8 @@ func (cli *DockerCli) CmdCp(args ...string) error {
|
||||
|
||||
cmd.ParseFlags(args, true)
|
||||
|
||||
info := strings.Split(cmd.Arg(0), ":")
|
||||
// deal with path name with `:`
|
||||
info := strings.SplitN(cmd.Arg(0), ":", 2)
|
||||
|
||||
if len(info) != 2 {
|
||||
return fmt.Errorf("Error: Path not specified")
|
||||
|
||||
Reference in New Issue
Block a user