-
Notifications
You must be signed in to change notification settings - Fork 24
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
--force doesn't work reliably #105
Comments
At this point, I'm not sure that the whole I see the PR and discussion around For, example, if I include the But |
The problem is not with the ignore logic, but the force param doesn‘t exactly do what you might think. Previously, if the ZIP file already existed, you would get a prompt to overwrite it. If selecting no, the command would exit. Otherwise it rund the zip command. The force param simply skips that prompt. The problem: if you run the zip program and the destination file already exists, it simply adds new files to it and it doesn‘t delete old ones. I think we need to pass the -FS (filesync) argument to the zip command, see https://linux.die.net/man/1/zip |
This, or just drop the zip file before creating a new one if |
I prefer simply passing an argument for a speed gain :-) |
#108 should fix this, if you wanna give it a try. |
@swissspidy I found this doc to checkout locally everything, but I don't understand how to run a global |
Also, I tried running
I'm using valet, and TablePlus to manage users, and MySQL 8, and PHP 8.2 as my default PHP version. |
If you check out only this repository and run If you want to run |
I tried Trying to figure out how to run the command from the branch while zip'ing a plugin located elsewhere :) |
Bug Report
Describe the current, buggy behavior
--force
does not trigger the file override when the .distignore was changed between runs.Describe how other contributors can replicate this bug
assets
directory in a pluginone/
andtwo/
dir.distignore
this line:**/one/
wp dist-archive . ./build --create-target-dir --force
assets/one
dir.distignore
this line:**/two/
wp dist-archive . ./build --create-target-dir --force
assets/two
directory even through it was excludedbuild/
directorywp dist-archive . ./build --create-target-dir --force
assets/one/
andassets/two/
So the problem looks like not with the
.distignore
processing, but the force overwrite. Even though the cli reports that the file was overwritten - the contents of it was not affected by that change in the.distignore
.Describe what you would expect as the correct outcome
--force
always overwrites the file with any changes introduced in.distignore
between runs.Let us know what environment you are running this on
Provide a possible solution
The logic inside the
--force
processing (here) seems to be fine.So I think this is OS-level file-content caching of the
.distignore
file.Maybe, use
clearstatcache()
for this file between runs?The text was updated successfully, but these errors were encountered: