Update fails on new files
See original GitHub issueSummary: When adding a new file to an already existing template, the new file is not added to an instance of the template upon update.
Im running cruft==2.5.0
here.
Step to reproduce:
- Have an existing template and an instance of that template.
- Add a new file to the template.
- Run
cruft update
.
Current behaviour:
cruft check
correctly detects the instance needs to be updated.$ cruft check FAILURE: Project's cruft is out of date! Run `cruft update` to clean this mess up.
cruft update
asks me to review a diff, but when asked to show it, it reports “no changes”.- If I apply it, it reports success, but the new file has not been added.
$ cruft update Respond with "s" to intentionally skip the update while marking your project as up-to-date or respond with "v" to view the changes that will be applied. Apply diff and update? (y, n, s, v) [y]: v There are no changes. Respond with "s" to intentionally skip the update while marking your project as up-to-date or respond with "v" to view the changes that will be applied. Apply diff and update? (y, n, s, v) [y]: y Good work! Project's cruft has been updated and is as clean as possible!
Expected behaviour of cruft update
:
- There is a meaningful diff shown for newly added files.
- If I accept it, the new files is created.
- Cruft should not report success if some change could not be handled correctly.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
5 Ways to Fix Some Update Files are Missing or Have Problems
The Some update files are missing error is usually due to a corrupted Windows update cache. Windows Update cannot correctly apply available ...
Read more >Some update files are missing or have problems. We'll try to ...
Try running that first. 2) If that fails try manually resetting Windows Update Service: Open administrative Command Prompt and type following ...
Read more >How to Fix the "Update Files are Missing" Error 0x80070003 ...
How to Fix the "Update Files are Missing" Error 0x80070003 on Windows · 1. Delete the Contents of the DataStore Folder · 2....
Read more >Error "Move new files in place" when update #133 - GitHub
Hello, i'm update my installation of nextcloud with the web updater and i've this error ... Error "Move new files in place" when...
Read more >7 Ways To Fix Windows Update Errors If They Failed - Action1
There are several reasons why Windows updates keep failing: Corrupt Update Files. In this case, try deleting the flawed file and see if...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @samj1912!
Indeed, this was a regression, adding new files was working in 2.4.0 already. (But moving files #53 was already an issue in that version.) It is good that both are now fixed.
I see how the originally intended use of
_get_deleted_files
actually solves our problem. And our solution for #53 looks exactly like yours. 👍I guess what we can learn here is that even having 100% line coverage in tests doesn’t protect us from having desired functionally still left untested. 😬
Anyway, thanks for providing the fix and the release! We’ll start using cruft now more often. 🙂
This is already fixed and released in
2.6.0
.