Skip to content

Commit af67b2c

Browse files
authored
Merge pull request kubernetes#83350 from soltysh/cp_fix
Update symlink warning
2 parents 40d4ddc + 99448d2 commit af67b2c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/kubectl/cmd/cp/cp.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ func (o *CopyOptions) untarAll(src fileSpec, reader io.Reader, destDir, prefix s
470470

471471
if mode&os.ModeSymlink != 0 {
472472
if !symlinkWarningPrinted && len(o.ExecParentCmdName) > 0 {
473-
fmt.Fprintf(o.IOStreams.ErrOut, "warning: file %q is a symlink, skipping (consider using \"%s exec -n %q %q -- tar cf - %q | tar xf -\")\n", destFileName, o.ExecParentCmdName, src.PodNamespace, src.PodName, src.File)
473+
fmt.Fprintf(o.IOStreams.ErrOut, "warning: skipping symlink: %q -> %q (consider using \"%s exec -n %q %q -- tar cf - %q | tar xf -\")\n", destFileName, header.Linkname, o.ExecParentCmdName, src.PodNamespace, src.PodName, src.File)
474474
symlinkWarningPrinted = true
475475
continue
476476
}

0 commit comments

Comments
 (0)