Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for leading slashes in .distignore, and deal gracefully with symlinks #61

Merged
merged 30 commits into from
Aug 31, 2022

Conversation

BrianHenryIE
Copy link
Member

This is tests and fixes for PRs #58 and #59.

The tests for 58 were relevant to those needed for 59.
The code in 59 fixed some of the issue in 58.

Closes #57 and #47.

PHPUnit tests are added to this repo for the first time and should be helpful for work that might be done on #15 and #44.

BrianHenryIE and others added 22 commits June 2, 2022 17:00
Working for zip
Not quite working for tar

The tar command is correct and works when I run it on the command line, but the tests are failing to exclude the file properly.
Fails on main wp-cli@eba7d1c

Passes with PR wp-cli#59
Working for zip
Not quite working for tar

The tar command is correct and works when I run it on the command line, but the tests are failing to exclude the file properly.
1. It seems `sys_get_temp_dir()` was being shared across multiple tests, so files already existed when subsequent tests were run.
2. Looks like the "no distignore file is present" test was failing after wp-cli#56 was merged.
@BrianHenryIE
Copy link
Member Author

Dammit, tests working locally on MacOS and not on GitHub Actions!

Syntax differences between tar on different systems?

@BrianHenryIE
Copy link
Member Author

I needed to use php_uname( 's' ) to test for Linux because tar's syntax and flags differ between MacOS and Linux.

tar's --anchored is not available on MacOS.
On MacOS tar, to anchor, exclusions are written beginning with ^ regex character.

@BrianHenryIE BrianHenryIE marked this pull request as ready for review August 27, 2022 20:42
@BrianHenryIE BrianHenryIE requested a review from a team as a code owner August 27, 2022 20:42
@danielbachhuber danielbachhuber changed the title Pr 58 and 59 Allow for leading slashes in .distignore, and deal gracefully with symlinks Aug 29, 2022
@danielbachhuber
Copy link
Member

Thanks @BrianHenryIE, appreciate your work on this.

I'll review this at depth when I have some time in the near future.

Copy link
Member

@danielbachhuber danielbachhuber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great me, @BrianHenryIE.

Thanks again for your effort on it, and your thorough tests. The tests pass for me locally on Mac.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Symlink in ignored directory causing out of memory error
3 participants