From f3c101f4c1642d974c2a946160c7b24fc617a109 Mon Sep 17 00:00:00 2001 From: Jordan Krage Date: Fri, 17 Feb 2023 09:25:58 -0600 Subject: [PATCH 1/2] core/cmd: fix CL_CONFIG handling --- core/cmd/app.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/cmd/app.go b/core/cmd/app.go index 136d3f5762d..3e6b510987c 100644 --- a/core/cmd/app.go +++ b/core/cmd/app.go @@ -70,9 +70,9 @@ func NewApp(client *Client) *cli.App { Usage: "optional, applies only in client mode when making remote API calls. If turned on, SSL certificate verification will be disabled. This is mostly useful for people who want to use Chainlink with a self-signed TLS certificate", }, cli.StringSliceFlag{ - Name: "config, c", - Usage: "TOML configuration file(s) via flag, or raw TOML via env var. If used, legacy env vars must not be set. Multiple files can be used (-c configA.toml -c configB.toml), and they are applied in order with duplicated fields overriding any earlier values. If the env var is specified, it is always processed last with the effect of being the final override.", - EnvVar: "CL_CONFIG", + Name: "config, c", + Usage: "TOML configuration file(s) via flag, or raw TOML via env var. If used, legacy env vars must not be set. Multiple files can be used (-c configA.toml -c configB.toml), and they are applied in order with duplicated fields overriding any earlier values. If the env var is specified, it is always processed last with the effect of being the final override. [$CL_CONFIG]", + // Note: we cannot use the EnvVar field since it will combine with the flags. }, cli.StringFlag{ Name: "secrets, s", @@ -80,7 +80,7 @@ func NewApp(client *Client) *cli.App { }, } app.Before = func(c *cli.Context) error { - if c.IsSet("config") { + if c.IsSet("config") || v2.EnvConfig != "" { // TOML var opts chainlink.GeneralConfigOpts From 047798a87509d5ab5cb5c12a3e33ed6f61e3e523 Mon Sep 17 00:00:00 2001 From: Jordan Krage Date: Fri, 17 Feb 2023 09:51:18 -0600 Subject: [PATCH 2/2] Update core/cmd/app.go Co-authored-by: chainchad <96362174+chainchad@users.noreply.github.com> --- core/cmd/app.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/cmd/app.go b/core/cmd/app.go index 3e6b510987c..23c9688c769 100644 --- a/core/cmd/app.go +++ b/core/cmd/app.go @@ -71,7 +71,7 @@ func NewApp(client *Client) *cli.App { }, cli.StringSliceFlag{ Name: "config, c", - Usage: "TOML configuration file(s) via flag, or raw TOML via env var. If used, legacy env vars must not be set. Multiple files can be used (-c configA.toml -c configB.toml), and they are applied in order with duplicated fields overriding any earlier values. If the env var is specified, it is always processed last with the effect of being the final override. [$CL_CONFIG]", + Usage: "TOML configuration file(s) via flag, or raw TOML via env var. If used, legacy env vars must not be set. Multiple files can be used (-c configA.toml -c configB.toml), and they are applied in order with duplicated fields overriding any earlier values. If the `CL_CONFIG` env var is specified, it is always processed last with the effect of being the final override. [$CL_CONFIG]", // Note: we cannot use the EnvVar field since it will combine with the flags. }, cli.StringFlag{