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

WISH: File tag for testing whether an env var is set or not #89

Open
HenrikBengtsson opened this issue Apr 15, 2020 · 1 comment
Open

Comments

@HenrikBengtsson
Copy link
Owner

It is possible to do:

  • FOO=abc.R
  • FOO=def.R
  • FOO!=abc.R

but it is neither possible to test for empty value nor non-defined values; the following doesn't work:

  • FOO=.R
  • FOO=,dummy.R
  • FOO='',dummy.R
  • FOO!=,dummy.R
  • FOO!='',dummy.R
@HenrikBengtsson
Copy link
Owner Author

HenrikBengtsson commented Sep 14, 2022

This would allow us to test for NO_COLOR, and other environment variables whose values do not matter. What matters is only whether or not the environment variable is defined (non-empty).

In order to move forward on this, we need a syntax for testing whether or not an environment variable is nuset (or empty). It could be !NO_COLOR to check when not set, but to check when set, we can't just use NO_COLOR, because that's ambigous. Maybe !!NO_COLOR?

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

No branches or pull requests

1 participant