diff --git a/client/logmon/z_logmon_cmd.go b/client/logmon/z_logmon_cmd.go index eafc0b8a835..33b5c2d117d 100644 --- a/client/logmon/z_logmon_cmd.go +++ b/client/logmon/z_logmon_cmd.go @@ -8,6 +8,11 @@ import ( "github.com/hashicorp/nomad/plugins/base" ) +// Install a plugin cli handler to ease working with tests +// and external plugins. +// This init() must be initialized last in package required by the child plugin +// process. It's recommended to avoid any other `init()` or inline any necessary calls +// here. See eeaa95d commit message for more details. func init() { if len(os.Args) > 1 && os.Args[1] == "logmon" { logger := hclog.New(&hclog.LoggerOptions{ diff --git a/drivers/docker/docklog/z_docker_logger_cmd.go b/drivers/docker/docklog/z_docker_logger_cmd.go index dd853a450d1..c4ad3a2b610 100644 --- a/drivers/docker/docklog/z_docker_logger_cmd.go +++ b/drivers/docker/docklog/z_docker_logger_cmd.go @@ -8,6 +8,11 @@ import ( "github.com/hashicorp/nomad/plugins/base" ) +// Install a plugin cli handler to ease working with tests +// and external plugins. +// This init() must be initialized last in package required by the child plugin +// process. It's recommended to avoid any other `init()` or inline any necessary calls +// here. See eeaa95d commit message for more details. func init() { if len(os.Args) > 1 && os.Args[1] == PluginName { logger := log.New(&log.LoggerOptions{ diff --git a/drivers/shared/executor/z_executor_cmd.go b/drivers/shared/executor/z_executor_cmd.go index aa25ef9b072..8f92310bc08 100644 --- a/drivers/shared/executor/z_executor_cmd.go +++ b/drivers/shared/executor/z_executor_cmd.go @@ -11,6 +11,11 @@ import ( "github.com/hashicorp/nomad/plugins/base" ) +// Install a plugin cli handler to ease working with tests +// and external plugins. +// This init() must be initialized last in package required by the child plugin +// process. It's recommended to avoid any other `init()` or inline any necessary calls +// here. See eeaa95d commit message for more details. func init() { if len(os.Args) > 1 && os.Args[1] == "executor" { if len(os.Args) != 3 {