martymac / fpart

Sort files and pack them into partitions
https://www.fpart.org/
BSD 2-Clause "Simplified" License
230 stars 39 forks source link

Look for MAIL_BIN in fpsync only if OPT_MAIL is set #20

Closed helgi closed 4 years ago

helgi commented 4 years ago

My system doesn't have mail resulting in which: no mail in (/sbin:/bin:/usr/sbin:/usr/bin) on every run; would be good to only look for mail if it is going to be used or silence it as checks are done later on in the code as well :)

martymac commented 4 years ago

Hello @helgi,

I have replaced calls to 'which' by calls to 'command -v', which should not emit error messages. Can you check that commit 27618ae824612c95ae59af69480812a7ad9e1067 fixes your problem ?

helgi commented 4 years ago

Looks good to me, thanks :) probably not required since it’s in a subshell already but would perhaps redirect errors to dev null