Closed BrianHenryIE closed 2 years ago
Tests are now passing on MacOS but not on GitHub Actions.
The problem was that PHP's escapeshellcmd()
was escaping the ^
used in the exclude rule to tie the path to the root.
I've added a function to permit exceptions in escapeshellcmd()
.
I'll have to set up Ubuntu locally and run the tests there. I'll use nektos/act.
It seems sys_get_temp_dir()
was being shared across multiple test Examples
, so files already existed as subsequent tests were run. This scenario is not possible when running the command from CLI wp dist-archive ...
.
There's a new test failure now! I have a feeling #59 will solve it. I'll work on the PR now.
Ship #61
Example project:
with example
.distignore
:Should archive:
This is working for
zip
.The tests are failing for
tar
, but when I echo the tar command that is being used and manually cd to the directory and paste and run it, it works.Could someone please take a look and see if they can make sense of why it's not working? I'm guessing it's related to the current working directory being somehow affected inside
WP_CLI::launch()
.@markjaquith