bundle config SOME_SETTING is expected to print the value for the requested setting.
If the setting has a value, it is printed to STDOUT and exit status of 0 is returned as expected. If the requested setting is not set or has no value, it is expected that a non-zero exit status is returned. (as is conventional for cli programs) However, an exit status of 0 is returned in all cases.
This means that scripts and utilities that wish to interrogate bundler to find the value for a given setting have to parse the STDOUT of bundle config in order to determine if a particular setting is unset.
$ bundle config something
Settings for `something` in order of priority. The top value will be used
You have not configured a value for `something`
$ echo $?
0
Further, if any work is done on this, I would strongly request that the output from this command go to STDERR.
I would expect bundler config foo 2>/dev/null to print nothing but the final computed value of foo. All the rest of bundler's output (which is indeed super helpful), should go to STDERR as it is extraneous to the core role of bundle-config. And thus bundler config UNSET 2>/dev/null would print no output and exit non-zero.
bundle config SOME_SETTINGis expected to print the value for the requested setting.If the setting has a value, it is printed to STDOUT and exit status of 0 is returned as expected. If the requested setting is not set or has no value, it is expected that a non-zero exit status is returned. (as is conventional for cli programs) However, an exit status of 0 is returned in all cases.
This means that scripts and utilities that wish to interrogate bundler to find the value for a given setting have to parse the STDOUT of
bundle configin order to determine if a particular setting is unset.Further, if any work is done on this, I would strongly request that the output from this command go to STDERR.
I would expect
bundler config foo 2>/dev/nullto print nothing but the final computed value offoo. All the rest of bundler's output (which is indeed super helpful), should go to STDERR as it is extraneous to the core role ofbundle-config. And thusbundler config UNSET 2>/dev/nullwould print no output and exit non-zero.