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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error message when key is missing from env #16

Merged
merged 1 commit into from
Feb 23, 2021
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion internal/envparser/envparser.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ func ParseEnv(keys []string) (*EnvVars, error) {
for _, k := range keys {
v, ok := os.LookupEnv(k)
if !ok {
return nil, fmt.Errorf("env variable %q not found", v)
return nil, fmt.Errorf("env variable %q not found", k)
}

// check if value is encrypted secret
Expand Down
2 changes: 1 addition & 1 deletion internal/envparser/envparser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ func TestParseEnv(t *testing.T) {
{
name: "env var not found",
keys: []string{"one"},
expectedErr: errors.New("not found"),
expectedErr: errors.New("\"one\" not found"),
},
{
name: "only plain",
Expand Down