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

Accept yes/no for boolean environment variables #2892

Closed
kdkasad opened this issue Jun 13, 2024 · 2 comments · Fixed by #2893
Closed

Accept yes/no for boolean environment variables #2892

kdkasad opened this issue Jun 13, 2024 · 2 comments · Fixed by #2893

Comments

@kdkasad
Copy link
Contributor

kdkasad commented Jun 13, 2024

Enhancement Type

Improve an existing feature

Describe the enhancement

I would like to add "yes" and "no" as equivalents for "true" and "false" respectively when handling boolean environment variables.

Reasons:

  1. It feels more natural: Enable autopause? Yes. Execute directly? No.
  2. Ansible supports using yes/no variables, so anyone deploying this Docker container using Ansible (e.g. users of Ansible NAS) might accidentally use yes/no and be confused why it isn't working.

I would be happy to implement this myself and open a PR. It should just require changing 2 lines of code.

@itzg
Copy link
Owner

itzg commented Jun 13, 2024

Great idea and a PR would be good. You mean just adding to the isTrue and isFalse functions, right?

@kdkasad
Copy link
Contributor Author

kdkasad commented Jun 13, 2024

Great idea and a PR would be good. You mean just adding to the isTrue and isFalse functions, right?

Yes, exactly. I'll have a PR in a few minutes.

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

Successfully merging a pull request may close this issue.

2 participants