vendor updates

This commit is contained in:
Serguei Bezverkhi
2018-03-06 17:33:18 -05:00
parent 4b3ebc171b
commit e9033989a0
5854 changed files with 248382 additions and 119809 deletions

View File

@ -64,7 +64,8 @@ var (
// NewCmdCp creates a new Copy command.
func NewCmdCp(f cmdutil.Factory, cmdOut, cmdErr io.Writer) *cobra.Command {
cmd := &cobra.Command{
Use: "cp <file-spec-src> <file-spec-dest>",
Use: "cp <file-spec-src> <file-spec-dest>",
DisableFlagsInUseLine: true,
Short: i18n.T("Copy files and directories to and from containers."),
Long: "Copy files and directories to and from containers.",
Example: cpExample,
@ -378,11 +379,8 @@ func untarAll(reader io.Reader, destFile, prefix string) error {
}
func getPrefix(file string) string {
if file[0] == '/' {
// tar strips the leading '/' if it's there, so we will too
return file[1:]
}
return file
// tar strips the leading '/' if it's there, so we will too
return strings.TrimLeft(file, "/")
}
func execute(f cmdutil.Factory, cmd *cobra.Command, options *ExecOptions) error {