-
Notifications
You must be signed in to change notification settings - Fork 363
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
Argument defaults from environment variables? #4105
Conversation
Yes please, that would make containers way easier to use |
bin/varnishadm/varnishadm.c
Outdated
@@ -467,6 +467,7 @@ main(int argc, char * const *argv) | |||
printf(OPTARG "\n"); | |||
exit(0); | |||
} | |||
n_arg = getenv("VARNISH_WORKING_DIR"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look like something we would want in libvarnishapi instead.
Mandatory bikeshedding: VARNISH_WORKDIR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look like something we would want in libvarnishapi instead.
Yes, just varnishadm
does not use VUT
.
Mandatory bikeshedding:
VARNISH_WORKDIR
please take a look:
$ git grep -Ei 'work.?dir'
$ git grep -Ei 'working.?dir'
If I did not overlook anything, there is one error message where it is "workdir", otherwise "workdir" is only used in code and all other messages and documentation are for "working directory". I abbreviated to "WORKING_DIR", but probably it should be VARNISH_WORKING_DIRECTORY
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, just
varnishadm
does not useVUT
.
I was referring to VSM_Attach()
.
all other messages and documentation are for "working directory". I abbreviated to "WORKING_DIR", but probably it should be
VARNISH_WORKING_DIRECTORY
?
If anything, I'd rather keep environment variables short and have the documentation use the whole "working directory" phrase.
bugwash: the bikeshed color is going to be |
with greetings from the rabbit-hole opened by #4105
64f9edb
to
8f8d26c
Compare
Putting the new fallback next to the historical fallback. Refs #4105
After 15 years of tirelessly repeating
-n <foo>
foreach and everyvarnish admin command, I wonder: is it time to set defaults from environment variables?This PR is not remotely complete. It is merely to ask about opinions.