svn commit: r483437 - in head/mail/dovecot: . files

Mathieu Arnold mat at FreeBSD.org
Wed Oct 31 15:02:54 UTC 2018


On Mon, Oct 29, 2018 at 11:28:27PM +0000, Larry Rosenman wrote:
> Modified: head/mail/dovecot/files/dovecot.in
> ==============================================================================
> --- head/mail/dovecot/files/dovecot.in	Mon Oct 29 23:25:58 2018	(r483436)
> +++ head/mail/dovecot/files/dovecot.in	Mon Oct 29 23:28:26 2018	(r483437)
> @@ -60,6 +60,14 @@ for config in ${dovecot_config}; do
>  	required_files="${config}"
>  	command_args="-c ${config}"
>  	if [ -s ${config} ]; then
> +               ${command} ${command_args} -a 2>/dev/null
> +                if [ $? -ne 0 ]; then

Never test for $?.  This should be:

if ${command} ${command_args} -a 2>/dev/null; then

All the rationale in https://github.com/koalaman/shellcheck/wiki/SC2181.


-- 
Mathieu Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-ports-all/attachments/20181031/ee38388e/attachment.sig>


More information about the svn-ports-all mailing list