Skip to content

Conversation

@bd82
Copy link

@bd82 bd82 commented Oct 5, 2021

fixes #162

}

// `err == nil` is used to skip lines which caused an error
if isPrefix == false && err == nil {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This condition should supposedly allow skipping "invalid" lines.
But I am not sure if such a situation could even exist...
Perhaps I should just return immediately if/when an err is spotted?

@bd82 bd82 force-pushed the read_long_lines branch from 25becca to ef28e68 Compare October 5, 2021 15:44

envMap, err := Read(envFileName)
if err != nil {
t.Error("Error reading file -> " + err.Error() )
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The bug can be reproduced by reverting the change in godotenv.go and executing this new test.

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

Successfully merging this pull request may close these issues.

Lines > 64k cause "bufio.Scanner: token too long"

1 participant