wp-cli / dist-archive-command

Create a distribution .zip or .tar.gz based on a plugin or theme's .distignore file
https://developer.wordpress.org/cli/commands/dist-archive/
MIT License
48 stars 24 forks source link

Get all tests running on MacOS #60

Closed BrianHenryIE closed 2 years ago

BrianHenryIE commented 2 years ago

The sed syntax is different on MacOS than Ubuntu (i.e. the GitHub Actions runner) so running the tests fail for me during development. I have made the bash command conditional – check for Darwin and run the appropriate command. I have replaced sed with awk.

tar is returning a bad exit code causing the run statements to fail. I've changed these to try and the subsequent assertions in the tests should mean ignoring the exit code at that point is acceptable. This might make PR #58 pass too.

BrianHenryIE commented 2 years ago

Hmmm... looks like this caused them to fail on GitHub Actions! I'll try again another day.

BrianHenryIE commented 2 years ago

I've replaced sed with awk which works identically on MacOS and the Github Actions runner.