diff --git a/agent/agent.go b/agent/agent.go index a813afe4d..8fc32dce2 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -1629,7 +1629,7 @@ func (a *Agent) AddCheck(check *structs.HealthCheck, chkType *structs.CheckType, } if chkType.IsScript() && !a.config.EnableScriptChecks { - return fmt.Errorf("Check types that exec scripts are disabled on this agent") + return fmt.Errorf("Scripts are disabled on this agent; to enable, configure 'enable_script_checks' to true") } } diff --git a/agent/agent_test.go b/agent/agent_test.go index c19ab9832..d366d5b7e 100644 --- a/agent/agent_test.go +++ b/agent/agent_test.go @@ -822,7 +822,7 @@ func TestAgent_AddCheck_ExecDisable(t *testing.T) { Interval: 15 * time.Second, } err := a.AddCheck(health, chk, false, "") - if err == nil || !strings.Contains(err.Error(), "exec scripts are disabled on this agent") { + if err == nil || !strings.Contains(err.Error(), "Scripts are disabled on this agent") { t.Fatalf("err: %v", err) }