Skip to content

Commit

Permalink
lint + CustomDefaultsEnvKey --> CustomDefaults
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickhuie19 committed Aug 16, 2024
1 parent f90b635 commit 9269fa0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions core/chains/evm/config/toml/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func init() {
})

// read the custom defaults overrides
dir := os.Getenv(string(env.CustomDefaultsEnvKey))
dir := env.CustomDefaults.Get()
if dir == "" {
// short-circuit; no default overrides provided
return
Expand All @@ -97,14 +97,14 @@ func init() {
path := dir + "/" + entry.Name()
file, err := os.Open(path)
if err != nil {
log.Printf("error opening file (name: %v) in custom defaults override directory: %w", entry.Name(), err)
log.Printf("error opening file (name: %v) in custom defaults override directory: %v", entry.Name(), err)
continue
}

// Read file contents
b, err := io.ReadAll(file)
if err != nil {
log.Printf("error reading file (name: %v) contents in custom defaults override directory: %w", entry.Name(), err)
log.Printf("error reading file (name: %v) contents in custom defaults override directory: %v", entry.Name(), err)
file.Close()
continue
}
Expand Down
2 changes: 1 addition & 1 deletion core/config/env/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var (
ThresholdKeyShare = Secret("CL_THRESHOLD_KEY_SHARE")
// Migrations env vars
EVMChainIDNotNullMigration0195 = "CL_EVM_CHAINID_NOT_NULL_MIGRATION_0195"
CustomDefaultsEnvKey = Var("CL_CHAIN_DEFAULTS")
CustomDefaults = Var("CL_CHAIN_DEFAULTS")
)

// LOOPP commands and vars
Expand Down

0 comments on commit 9269fa0

Please sign in to comment.