The new user initialisation via MONGO_INITDB_ROOT_USERNAME and MONGO_INITDB_ROOT_PASSWORD adds an --auth option to $@
This causes a problem when a user supplies --auth.
Error parsing command line: Multiple occurrences of option "----auth"
try 'mongod --help' for more information
Which is non obvious until you look at the script.
Maybe if ! echo "$@" | grep -qw -- '--auth'; then echo "Adding --auth" ?
Yeah the mongo error is a little non-obvious. (also, why did they add the extra dashes? ----auth).
It seems sane to only add it when it is not already in the arguments.
How irritating that it can't just realize that we didn't even ask for conflicting things and accept it. :cry:
Thanks! for arg is one of those things that's always been there but I've never seen/used in how ever many years scripting.
Most helpful comment
Thanks!
for argis one of those things that's always been there but I've never seen/used in how ever many years scripting.