LycheeOrg / Lychee-Docker

Docker image for Lychee
https://lycheeorg.github.io/
167 stars 55 forks source link

improved regex deletion #179

Closed ildyria closed 8 months ago

ildyria commented 9 months ago

Fixes #178

ildyria commented 9 months ago

Command tested in my docker container:

root@e7d513f87a2f:/var/www/html/Lychee# find /var/www/html/Lychee -regex '.*/[Tt]ests?/.*' | wc
    282     284   18558
root@e7d513f87a2f:/var/www/html/Lychee# find . -regex '.*/[Tt]ests?/.*' | wc
    282     284   13200
root@e7d513f87a2f:/var/www/html/Lychee# find /var/www/html/Lychee -wholename '*/[Tt]ests/*' | wc
    230     232   14288
root@e7d513f87a2f:/var/www/html/Lychee# find /var/www/html/Lychee -wholename '*/[Tt]est/*' | wc
     52      52    4270
d7415 commented 9 months ago

I just built this and the tests folder is still there with all the samples :(

d7415 commented 9 months ago

FWIW the old find but with pull path instead of . doesn't work either. I'll try to look at what find finds during the build when I get a chance, to check it's actually trying to delete. Running the old find from within the finished container deletes everything in the tests directory (but not the directory itself).

ildyria commented 9 months ago

Running the old find from within the finished container deletes everything in the tests directory (but not the directory itself).

It is more than just THAT test directory, it is aimed to target all the test directory in the vendor.

d7415 commented 9 months ago

It is more than just THAT test directory, it is aimed to target all the test directory in the vendor.

Yeah, but that one's easy to test and big.