Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upDiesel CLI doesn't work with busybox `patch` #1817
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sgrif commentedAug 9, 2018
On gitter the following error was reported:
stderr: patch: can't open 'src/db/schema.rs': File exists. They were using busybox. Installing GNU patch appeared to fix the issue. That error message corresponds toEEXIST, which is likely coming from passingO_EXCLtoopen. I can confirm that busybox uses that, not sure about GNU.If that is in fact the case, the solution is to close all open handles to the file before shelling out to
patch. I'm not sure if that's actually a feasible option though, since our file is sometimes a tempfile (when I say I'm not sure though, I mean I'm actually not sure. Sincepatchoverrides the file, it does make our previous handle invalid. If we were faced with a pathological tempfile system that immediately deletes the file when all handles to it are closed, I'm not sure if we even work today)In any case, we need to:
src/schema.rsand printing to stdoutFile existsin stderr and say "you may be using busybox, we only support GNU"I'm fine with a PR to improve our error message in the short term while we figure out if we can even support busybox.