New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
scripts: apply fixes to helpers when using set -eE
#3285
Conversation
For an upcoming PR, these changes are required, because the script that is using the helpers uses `set -eE`. This leads to situations where errors are not properly handled in our helpers (yet; I plan on changing that in the future).
475e18a
to
98aac32
Compare
function _adjust_mtime_for_postfix_maincf
{
if [[ $(( $(date '+%s') - $(stat -c '%Y' '/etc/postfix/main.cf') )) -lt 2 ]]
then
touch -d '2 seconds ago' /etc/postfix/main.cf
fi
return 0
} If |
It's not the touch - it's the condition in the Looking at it again, you're right about the |
I think you are wrong, that's not the case:
or
|
You are indeed correct, there is a difference between set -eE
function x() {
if false && :; then :; fi
}
x
echo "this will show up" and set -eE
function x() {
false && :
}
x
echo "this wont show up" I will correct my error and remove unnecessary |
Description
For an upcoming PR, these changes are required, because the script that is using the helpers uses
set -eE
. This leads to situations where errors are not properly handled in our helpers (yet; I plan on changing that in the future).Fixes issues of an upcoming PR that I do not want to include in the upcoming PR because I am a nice maintainer and I try my best to separate concerns with PRs :D 馃槅
The
return 0
statements at the end of some functions seem superflous, but they are not, because the previos command (even when run inside anif
-clause) set the return value to non-zero, which is not what we want.Type of change
Checklist:
docs/
)