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

1.5.0 Breaks spf13/viper #27

Closed
arhea opened this issue Aug 15, 2023 · 2 comments
Closed

1.5.0 Breaks spf13/viper #27

arhea opened this issue Aug 15, 2023 · 2 comments

Comments

@arhea
Copy link

arhea commented Aug 15, 2023

Just updated dependencies in one of our projects and noticed that builds are now failing on gotenv 1.5.0. This may be a problem with upstream packages but thought I would start here. The package throwing the error is spf13/viper

The following error appears during builds. The viper version did not change.

/go/pkg/mod/github.com/spf13/viper@v1.16.0/internal/encoding/dotenv/codec.go:51:33: cannot use &buf (value of type *bytes.Buffer) as gotenv.Reader value in argument to gotenv.StrictParse: *bytes.Buffer does not implement gotenv.Reader (missing method ReadAt)
failed to build, error: exit status 1
@arhea
Copy link
Author

arhea commented Aug 15, 2023

Workaround for now, is adding the following line to go.mod

replace github.com/subosito/gotenv => github.com/subosito/gotenv v1.4.2

@subosito
Copy link
Owner

@arhea Sorry for the noise, just published v1.6.0 to fix this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants