Open siebert opened 6 years ago
I have no idea why Travis CI complains about formatting in python files when only a shell file is changed by this commit. Seems to me an error in the CI configuration.
@siebert I don't see how this PR is handling multiple images. Note though that instead of using that simplistic script a much better alternative would be to use https://github.com/sk-/optimage.
Thanks for pointing the problem with the Python formatting, the reason is because I didn't pin the yapf version in the requirements.
The actual fix is this line:
OUTFILE="$(mktemp)"
Using a fixed tempfile name didn't work for me for patches which contains multiple pngs. Apparently the script is run in parallel, so the same tempfile is rewritten/removed by other instances when tried to read by the current instance which then fails.
Also clean up the script and make it pass shellcheck.