Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cruft update fails but updates commit

See original GitHub issue

Mac Os 10.14.6 Cruft 1.1.2

cruft update gives error: Apply diff and update [y/n/s]? y patch: unrecognized option --merge' patch: Try patch --help’ for more information.

The .cruft.json file gets updated with new commit number and thinks the update was applied

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

davidedmondscommented, Dec 4, 2019

Managed to work around this using the GNU patch tool, instead of OSX’s built-in version, as that recognises the --merge option being used. Using homebrew, it was brew install gpatch to get that added.

metall0idcommented, Jan 30, 2020

Having the same issue here on my Mac running Catalina.

I patched it locally on my machine to use

patch -p1 --no-backup-if-mismatch

instead of

patch -p1 --merge

I understand that this is not really the same thing but this project is so useful I wanted an immediate fix.

A question for the author @timothycrosley: if I were to implement a fix for this how would you like it done? I could:

  • Add a check for Darwin platform and run the command I posted above. This doesn’t really give the same merge behaviour but is really non-intrusive
  • Use a library like This doesn’t really give the same elegant patch output as git diff and is quite an overhaul
  • Bundle a zipped patch binary for Mac that is extracted and used if platform is Darwin. A zipped included binary will add about ~95KB to the package size

Other suggestions?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Automatic Template Updates: cruft automates the process of updating code to match the latest version of a template, making it easy to utilize...
Read more >
user-manual Documentation - Git
Updating a repository with git fetch. After you clone a repository and commit a few changes of your own, you may wish to...
Read more >
How to commit no change and new message? - Stack Overflow
I want to do this because I pushed a commit, but forgot to mention something in the commit message. Our commit messages are...
Read more >
Re: [PATCH v5] submodule merge: update conflict error message ...
But cutting the cruft at the top is still not enough, because the below are not ... while the patch is being polished,...
Read more >
Project template for modern Python packages - Wolt Blog
We took this to the next level by creating a GitHub Actions workflow which runs the cruft update periodically, commits the changes, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found