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

Skip empty value assignment #92

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ezh
Copy link

@ezh ezh commented Jun 5, 2022

There might be a situation when a shell contains an empty environment variable. In such a case, we get the next error for a boolean field, for example:

strconv.ParseBool: parsing "": invalid syntax

I propose to treat empty string values as absent ones.

@ezh
Copy link
Author

ezh commented Jun 22, 2022

Hey @ilyakaznacheev 👋 Is it possible to apply this fix? IMO it keeps logic the same. This is a very small improvement.

@ilyakaznacheev
Copy link
Owner

Well, I'm not sure that it is what we want. IMO the user may want to set to the variable an empty value or space - and the change will break that case.

I agree with the case with the boolean field - it is indeed an error and needs to be fixed. But maybe we only need to do this validation when we process boolean fields.

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.

None yet

2 participants