diff options
Diffstat (limited to 'internal/command/shared')
3 files changed, 4 insertions, 6 deletions
diff --git a/internal/command/shared/accessverifier/accessverifier.go b/internal/command/shared/accessverifier/accessverifier.go index 3aaf98d..5d2d709 100644 --- a/internal/command/shared/accessverifier/accessverifier.go +++ b/internal/command/shared/accessverifier/accessverifier.go @@ -2,11 +2,11 @@ package accessverifier import ( "errors" - "fmt" "gitlab.com/gitlab-org/gitlab-shell/internal/command/commandargs" "gitlab.com/gitlab-org/gitlab-shell/internal/command/readwriter" "gitlab.com/gitlab-org/gitlab-shell/internal/config" + "gitlab.com/gitlab-org/gitlab-shell/internal/console" "gitlab.com/gitlab-org/gitlab-shell/internal/gitlabnet/accessverifier" ) @@ -39,7 +39,5 @@ func (c *Command) Verify(action commandargs.CommandType, repo string) (*Response } func (c *Command) displayConsoleMessages(messages []string) { - for _, msg := range messages { - fmt.Fprintf(c.ReadWriter.ErrOut, "> GitLab: %v\n", msg) - } + console.DisplayInfoMessages(messages, c.ReadWriter.ErrOut) } diff --git a/internal/command/shared/accessverifier/accessverifier_test.go b/internal/command/shared/accessverifier/accessverifier_test.go index 39c2a66..cfcf4a8 100644 --- a/internal/command/shared/accessverifier/accessverifier_test.go +++ b/internal/command/shared/accessverifier/accessverifier_test.go @@ -77,6 +77,6 @@ func TestConsoleMessages(t *testing.T) { cmd.Args = &commandargs.Shell{GitlabKeyId: "1"} cmd.Verify(action, repo) - require.Equal(t, "> GitLab: console\n> GitLab: message\n", errBuf.String()) + require.Equal(t, "remote: \nremote: console\nremote: message\nremote: \n", errBuf.String()) require.Empty(t, outBuf.String()) } diff --git a/internal/command/shared/disallowedcommand/disallowedcommand.go b/internal/command/shared/disallowedcommand/disallowedcommand.go index 3c98bcc..794944f 100644 --- a/internal/command/shared/disallowedcommand/disallowedcommand.go +++ b/internal/command/shared/disallowedcommand/disallowedcommand.go @@ -3,5 +3,5 @@ package disallowedcommand import "errors" var ( - Error = errors.New("> GitLab: Disallowed command") + Error = errors.New("Disallowed command") ) |