Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core/cmd: fix CL_CONFIG handling #8474

Merged
merged 2 commits into from
Feb 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions core/cmd/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,17 @@ 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 `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{
Name: "secrets, s",
Usage: "TOML configuration file for secrets. Must be set if and only if config is set.",
},
}
app.Before = func(c *cli.Context) error {
if c.IsSet("config") {
if c.IsSet("config") || v2.EnvConfig != "" {
// TOML
var opts chainlink.GeneralConfigOpts

Expand Down