|
|
|
@ -68,7 +68,7 @@ func newRegistryLoginCmd(cfg *action.Configuration, out io.Writer) *cobra.Comman
|
|
|
|
|
return cmd
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Adapted from the ORAS project
|
|
|
|
|
// Adapted from https://github.com/oras-project/oras
|
|
|
|
|
func getUsernamePassword(usernameOpt string, passwordOpt string, passwordFromStdinOpt bool) (string, string, error) {
|
|
|
|
|
var err error
|
|
|
|
|
username := usernameOpt
|
|
|
|
@ -111,7 +111,7 @@ func getUsernamePassword(usernameOpt string, passwordOpt string, passwordFromStd
|
|
|
|
|
return username, password, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Copied/adapted from the ORAS project
|
|
|
|
|
// Copied/adapted from https://github.com/oras-project/oras
|
|
|
|
|
func readLine(prompt string, silent bool) (string, error) {
|
|
|
|
|
fmt.Print(prompt)
|
|
|
|
|
if silent {
|
|
|
|
|