-
Notifications
You must be signed in to change notification settings - Fork 2
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
fatal: unable to read files to diff #1
Comments
I think this is because the underlying prettier_d process died, but the ~/.prettier_d file is still present (this happens when you reboot your machine). Try removing |
This should be fixed in |
Great! Thank you:) You were totally right about it being prettier_d file that was present. |
Sure thing! I had definitely encountered this problem as well, but just hadn't gotten around to fixing it. |
I have the same error with the latest version, could you please confirm? |
@sandangel can you run the following and copy/paste the commands and output here: rm ~/.prettier_d
prettier-diff --version
prettier-diff # put your arguments here |
hi @josephfrazier , there is no prettier-diff --version option. $ yarn global add prettier-diff
yarn global v1.13.0
[1/4] 🔍 Resolving packages...
warning prettier-diff > prettier_d > sinon > nise > text-encoding@0.6.4: no longer maintained
[2/4] 🚚 Fetching packages...
[3/4] 🔗 Linking dependencies...
warning "@vue/cli > @vue/cli-ui > graphql-type-json@0.2.1" has unmet peer dependency "graphql@>=0.8.0".
[4/4] 🔨 Building fresh packages...
success Installed "prettier-diff@0.0.15" with binaries:
- prettier-diff
- textconv-prettier
✨ Done in 33.95s. $ rm -rf ~/.prettier_d
$ prettier-diff --version
error: invalid option: --version $ prettier-diff f9bef21 # previous commit
nc: invalid option -- q
usage: nc [-46AacCDdEFhklMnOortUuvz] [-K tc] [-b boundif] [-i interval] [-p source_port] [--apple-delegate-pid pid] [--apple-delegate-uuid uuid]
[-s source_ip_address] [-w timeout] [-X proxy_version]
[-x proxy_address[:port]] [hostname] [port[s]]
fatal: unable to read files to diff
|
Ah, this is due to a difference in how I've recently rewritten the |
hi @josephfrazier I think prettier-diff is using the latest commit from prettier_d "prettier_d": "https://github.com/josephfrazier/prettier_d.js", let me try editing the prettier_d script |
Oh good catch, I had forgotten about that. Yeah I'll probably have to change some things here before it'll work again |
Is everything working now in prettier-diff? (node:24005) UnhandledPromiseRejectionWarning: Error: Command failed: '/usr/lib/node_modules/prettier-diff/node_modules/.bin/prettier_d' start
/bin/sh: 1: /usr/lib/node_modules/prettier-diff/node_modules/.bin/prettier_d: not found
at checkExecSyncError (child_process.js:616:11)
at Object.execSync (child_process.js:653:13)
at sh (/usr/lib/node_modules/prettier-diff/node_modules/shell-tag/index.js:7:12)
at isPrettierdReachable.then.reachable (/usr/lib/node_modules/prettier-diff/bin/prettier-diff.js:36:7)
(node:24005) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:24005) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. |
@cowai I just published version |
@josephfrazier fs.js:120
throw err;
^
Error: EISDIR: illegal operation on a directory, read
at Object.readSync (fs.js:515:3)
at tryReadSync (fs.js:338:20)
at Object.readFileSync (fs.js:375:19) |
Unfortunately, I'm now on OSX (whereas I developed this on Ubuntu), and I don't currently use |
$ prettier-diff diff --git a/app-icon.png b/app-icon.png old mode 100644 new mode 100755 index a4b70c6..1fb3ba1 fatal: unable to read files to diff
This happens on all repos I have.
I am using Ubuntu 17.10, and have git version 2.14.1.
The text was updated successfully, but these errors were encountered: