nyxnor / onionjuggler

Manage your Onion Services via CLI or TUI on Unix-like operating system with a POSIX compliant shell.
MIT License
36 stars 2 forks source link

[QUESTION] - should non env variables be all upercase #11

Closed nyxnor closed 2 years ago

nyxnor commented 2 years ago

My doubt is / How can I:

Env var should be distinguishable according to posix and this stackoverflow answer. The .onionrc is a lib and "exports" vars to other scripts.

nyxnor commented 2 years ago

There is another reason for this, shellcheck understand ALL_CAPS as environmental variables, so it does not check if the variable was assigned before. Because of this, when dealing with sourced scripts, error out if variables are empty or unset with : ${var:?}.

Example of shellcheck that should output error on both instances, but only happened on one

image image