mirror of
https://github.com/containers/skopeo.git
synced 2025-09-03 23:55:21 +00:00
Bump github.com/containers/common from 0.39.0 to 0.40.0
Bumps [github.com/containers/common](https://github.com/containers/common) from 0.39.0 to 0.40.0. - [Release notes](https://github.com/containers/common/releases) - [Commits](https://github.com/containers/common/compare/v0.39.0...v0.40.0) --- updated-dependencies: - dependency-name: github.com/containers/common dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
6
vendor/github.com/containers/common/pkg/auth/auth.go
generated
vendored
6
vendor/github.com/containers/common/pkg/auth/auth.go
generated
vendored
@@ -134,9 +134,13 @@ func Login(ctx context.Context, systemContext *types.SystemContext, opts *LoginO
|
||||
|
||||
if err = docker.CheckAuth(ctx, systemContext, username, password, server); err == nil {
|
||||
// Write the new credentials to the authfile
|
||||
if err := config.SetAuthentication(systemContext, server, username, password); err != nil {
|
||||
desc, err := config.SetCredentials(systemContext, server, username, password)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if opts.Verbose {
|
||||
fmt.Fprintln(opts.Stdout, "Used: ", desc)
|
||||
}
|
||||
}
|
||||
if err == nil {
|
||||
fmt.Fprintln(opts.Stdout, "Login Succeeded!")
|
||||
|
2
vendor/github.com/containers/common/pkg/auth/cli.go
generated
vendored
2
vendor/github.com/containers/common/pkg/auth/cli.go
generated
vendored
@@ -20,6 +20,7 @@ type LoginOptions struct {
|
||||
Username string
|
||||
StdinPassword bool
|
||||
GetLoginSet bool
|
||||
Verbose bool // set to true for verbose output
|
||||
// Options caller can set
|
||||
Stdin io.Reader // set to os.Stdin
|
||||
Stdout io.Writer // set to os.Stdout
|
||||
@@ -47,6 +48,7 @@ func GetLoginFlags(flags *LoginOptions) *pflag.FlagSet {
|
||||
fs.StringVarP(&flags.Username, "username", "u", "", "Username for registry")
|
||||
fs.BoolVar(&flags.StdinPassword, "password-stdin", false, "Take the password from stdin")
|
||||
fs.BoolVar(&flags.GetLoginSet, "get-login", false, "Return the current login user for the registry")
|
||||
fs.BoolVarP(&flags.Verbose, "verbose", "v", false, "Write more detailed information to stdout")
|
||||
return &fs
|
||||
}
|
||||
|
||||
|
6
vendor/github.com/containers/common/pkg/report/template.go
generated
vendored
6
vendor/github.com/containers/common/pkg/report/template.go
generated
vendored
@@ -130,7 +130,7 @@ func NewTemplate(name string) *Template {
|
||||
func (t *Template) Parse(text string) (*Template, error) {
|
||||
if strings.HasPrefix(text, "table ") {
|
||||
t.isTable = true
|
||||
text = "{{range .}}" + NormalizeFormat(text) + "{{end}}"
|
||||
text = "{{range .}}" + NormalizeFormat(text) + "{{end -}}"
|
||||
} else {
|
||||
text = NormalizeFormat(text)
|
||||
}
|
||||
@@ -157,12 +157,12 @@ func (t *Template) IsTable() bool {
|
||||
return t.isTable
|
||||
}
|
||||
|
||||
var rangeRegex = regexp.MustCompile(`{{\s*range\s*\.\s*}}.*{{\s*end\s*}}`)
|
||||
var rangeRegex = regexp.MustCompile(`{{\s*range\s*\.\s*}}.*{{\s*end\s*-?\s*}}`)
|
||||
|
||||
// EnforceRange ensures that the format string contains a range
|
||||
func EnforceRange(format string) string {
|
||||
if !rangeRegex.MatchString(format) {
|
||||
return "{{range .}}" + format + "{{end}}"
|
||||
return "{{range .}}" + format + "{{end -}}"
|
||||
}
|
||||
return format
|
||||
}
|
||||
|
Reference in New Issue
Block a user