diff --git a/cmd/cluster-agent/subcommands/start/command.go b/cmd/cluster-agent/subcommands/start/command.go index eac57acf33b00..8132cbee8a3f3 100644 --- a/cmd/cluster-agent/subcommands/start/command.go +++ b/cmd/cluster-agent/subcommands/start/command.go @@ -390,7 +390,7 @@ func start(log log.Component, }() } - if config.GetBool("cluster_agent.language_detection.patcher.enabled") { + if config.GetBool("language_detection.enabled") && config.GetBool("cluster_agent.language_detection.patcher.enabled") { if err = languagedetection.Start(mainCtx, wmeta, log); err != nil { log.Errorf("Cannot start language detection patcher: %v", err) }