Fix 'sympa config' command return code to be 0 when there are no changes - #1518
Conversation
|
Hi @k0lter , It makes sense not to die(), however I feel the message "Not changed." helps. |
|
Hi @ikedas It will pollute stdout especially when used multiple times in scripts. Could you consider adding a Thanks, |
|
As -use constant _options => qw(output|o=s@);
+use constant _options => qw(output|o=s@ silent|s);(BTW since stdout pollution is the problem for all commands, I'd like to make this option available for all the other commands in the future.) |
|
Sounds good to me. Thanks. |
|
Yes, but I would suggest to use "--noout" or something similar as it is easy to confuse --quiet and --silent. |
|
|
|
Though I've not tested yet, I've added the |
|
Thanks @ikedas |
"Skip output" is easier to parse for the human brain than "No output". |
|
Thanks racke. I re-pushed correction and more changes. |
…y k0lter & ikedas Add --noout option to sympa command line (see #1518)
While trying to update a config value using
sympa configcommand when there are no changes, it die() with a return code > 0.It means that the command is not idempotent.
As an example, we started to use it in Debian Maintainer scripts with some config parameters instead of our custom routines to update configuration.