Append success/failure commands of latexmk instead of overwriting. #2076
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Append success and failure callbacks to
success_cmd
andfailure_cmd
instead of overwriting them. This allows to use them in a latexmkrc-file, where right now they are overwritten and hence not executed. This fixes #1237.I introduce a function
wrap_append_cmd_option
that only differs fromwrap_option
by.=
instead of=
which is appending in perl;
before the appended value. This separates shell commands. It is no problem if the variable was empty beforehand.I am unsure if this works correctly on windows since I never did scripting there and do not know if
;
has the same effect. One could easily use the old variant for windows if this does not work.The change only influences
success_cmd
andfailure_cmd
since I did not changewrap_option
here. In my opinion overwriting is the right thing to do at the other places it is used.