yari: Autocompression of images not working on Windows

When I try to compress images on Windows I get an error. The test case is this branch https://github.com/hamishwillee/content/tree/backup_devtools_badcomp and the file: files/en-us/tools/page_inspector/how_to/examine_and_edit_css/show_pseudo_classes_hover.png

Note, this same branch compresses fine on Ubuntu 20.04.

Error as shown below.

D:\github\mozilla\mdn_content\content>yarn filecheck "files/en-us/tools/page_inspector/how_to/examine_and_edit_css/show_pseudo_classes_hover.png" --save-compression
yarn run v1.22.5
$ env-cmd --silent cross-env CONTENT_ROOT=files node node_modules/@mdn/yari/filecheck/cli.js --cwd=$(pwd) files/en-us/tools/page_inspector/how_to/examine_and_edit_css/show_pseudo_classes_hover.png --save-compression
files/en-us/tools/page_inspector/how_to/examine_and_edit_css/show_pseudo_classes_hover.png was unexpected at this time.

D:\github\mozilla\mdn_content\content>  "D:\github\mozilla\mdn_content\content\node_modules\.bin\\node.exe"  "D:\github\mozilla\mdn_content\content\node_modules\.bin\\..\env-cmd\bin\env-cmd.js" --silent cross-env CONTENT_ROOT=files node node_modules/@mdn/yari/filecheck/cli.js --cwd=$(pwd) files/en-us/tools/page_inspector/how_to/examine_and_edit_css/show_pseudo_classes_hover.png --save-compression
error Command failed with exit code 255.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

More information on what was tried in https://github.com/mdn/content/pull/1338#issuecomment-761906015

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 32 (18 by maintainers)

Most upvoted comments

@peterbe I understand your frustration. Could you keep polite here? (Or take this dicussion off-thread by using e-mail). It feels toxic to readers of these issues.

Sure. Thanks for reminding me. If you can, when you see comments that are distracting and off-tangent, help out to remind to keep the discussion focussed.

You can edit the package.config locally in the content repo https://github.com/mdn/content/blob/6e21cfdfbac220b6d601ff92a274aaab3957a652/package.json#L12 to

"filecheck": "env-cmd --silent cross-env CONTENT_ROOT=files node node_modules/@mdn/yari/filecheck/cli.js",