From d25a3526afd2cb191e98c5bbdafea8adf976f915 Mon Sep 17 00:00:00 2001 From: Jason O'Donnell <2160810+jasonodonnell@users.noreply.github.com> Date: Thu, 21 Jul 2022 16:43:50 -0400 Subject: [PATCH] command/audit: improve audit enable type missing error message (#16409) * command/audit: improve audit enable type missing error message * changelog --- changelog/16409.txt | 3 +++ command/audit_enable.go | 2 +- command/audit_enable_test.go | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 changelog/16409.txt diff --git a/changelog/16409.txt b/changelog/16409.txt new file mode 100644 index 000000000..d8f83b029 --- /dev/null +++ b/changelog/16409.txt @@ -0,0 +1,3 @@ +```release-note:improvement +command/audit: Improve missing type error message +``` diff --git a/command/audit_enable.go b/command/audit_enable.go index fae423944..9ed7d5d30 100644 --- a/command/audit_enable.go +++ b/command/audit_enable.go @@ -110,7 +110,7 @@ func (c *AuditEnableCommand) Run(args []string) int { args = f.Args() if len(args) < 1 { - c.UI.Error("Missing TYPE!") + c.UI.Error("Error enabling audit device: audit type missing. Valid types include 'file', 'socket' and 'syslog'.") return 1 } diff --git a/command/audit_enable_test.go b/command/audit_enable_test.go index 1f55703c2..7d19f086a 100644 --- a/command/audit_enable_test.go +++ b/command/audit_enable_test.go @@ -32,7 +32,7 @@ func TestAuditEnableCommand_Run(t *testing.T) { { "empty", nil, - "Missing TYPE!", + "Error enabling audit device: audit type missing. Valid types include 'file', 'socket' and 'syslog'.", 1, }, {