From 946378c56691f5aeb7d3997f54d66113ae038e47 Mon Sep 17 00:00:00 2001 From: Chris Crone Date: Fri, 20 Nov 2020 14:40:56 +0100 Subject: [PATCH] commands: Correct input colors Signed-off-by: Chris Crone --- internal/commands/repo/rm.go | 2 +- internal/commands/tag/rm.go | 2 +- internal/login/login.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/commands/repo/rm.go b/internal/commands/repo/rm.go index 8faee21..db72d2c 100644 --- a/internal/commands/repo/rm.go +++ b/internal/commands/repo/rm.go @@ -76,7 +76,7 @@ func runRm(ctx context.Context, streams command.Streams, hubClient *hub.Client, } fmt.Fprintln(streams.Out(), ansi.Warn(fmt.Sprintf("WARNING: You are about to permanently delete repository %q including %d tag(s)", namedRef.Name(), count))) fmt.Fprintln(streams.Out(), ansi.Warn(" This action is irreversible")) - fmt.Fprintln(streams.Out(), ansi.Warn("Enter the name of the repository to confirm deletion:"), namedRef.Name()) + fmt.Fprintln(streams.Out(), ansi.Info("Enter the name of the repository to confirm deletion:"), namedRef.Name()) userIn := make(chan string, 1) go func() { reader := bufio.NewReader(streams.In()) diff --git a/internal/commands/tag/rm.go b/internal/commands/tag/rm.go index 3fca012..ed0f189 100644 --- a/internal/commands/tag/rm.go +++ b/internal/commands/tag/rm.go @@ -73,7 +73,7 @@ func runRm(ctx context.Context, streams command.Streams, hubClient *hub.Client, if !opts.force { fmt.Fprintln(streams.Out(), ansi.Warn(fmt.Sprintf(`WARNING: You are about to permanently delete image "%s:%s"`, reference.FamiliarName(ref), ref.Tag()))) fmt.Fprintln(streams.Out(), ansi.Warn(" This action is irreversible")) - fmt.Fprintf(streams.Out(), "Are you sure you want to delete the image tagged %q from repository %q? [y/N]", ref.Tag(), reference.FamiliarName(ref)) + fmt.Fprintf(streams.Out(), ansi.Info("Are you sure you want to delete the image tagged %q from repository %q? [y/N] "), ref.Tag(), reference.FamiliarName(ref)) userIn := make(chan string, 1) go func() { reader := bufio.NewReader(streams.In()) diff --git a/internal/login/login.go b/internal/login/login.go index 33772a8..076f444 100644 --- a/internal/login/login.go +++ b/internal/login/login.go @@ -102,7 +102,7 @@ func readPassword(streams command.Streams) (string, error) { if err != nil { return "", err } - fmt.Fprintf(streams.Out(), "Password: ") + fmt.Fprint(streams.Out(), ansi.Info("Password: ")) if err := term.DisableEcho(in.FD(), oldState); err != nil { return "", err }