Skip to content

Commit

Permalink
Merge pull request #757 from Juniper/bug/756-env-var-prefix-twice
Browse files Browse the repository at this point in the history
Fix duplicate prefix on `API_TIMEOUT` environment variable
  • Loading branch information
chrismarget-j authored Jul 31, 2024
2 parents dea7f1d + d1e37d0 commit fbe9dc1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apstra/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ func (o *providerConfig) fromEnv(_ context.Context, diags *diag.Diagnostics) {
o.Experimental = types.BoolValue(v)
}

if s, ok := os.LookupEnv(o.EnvVarPrefix.String() + o.EnvVarPrefix.String() + constants.EnvApiTimeout); ok && o.ApiTimeout.IsNull() {
if s, ok := os.LookupEnv(o.EnvVarPrefix.String() + constants.EnvApiTimeout); ok && o.ApiTimeout.IsNull() {
v, err := strconv.ParseInt(s, 0, 64)
if err != nil {
diags.AddError(fmt.Sprintf("error parsing environment variable %q", o.EnvVarPrefix.String()+constants.EnvApiTimeout), err.Error())
Expand Down

0 comments on commit fbe9dc1

Please sign in to comment.