-
-
Notifications
You must be signed in to change notification settings - Fork 299
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
Crash if calling diff on a deleted file #950
Comments
Even if testing isBinarySync correctly for null content, the generator will then crash calling |
|
dbushong
added a commit
to dbushong/generator
that referenced
this issue
Jul 3, 2017
Makes `null` content (file deletion): 1. not identify as binary (so default diff style is nicer) 2. not break binary diff if it is Addresses regression(?) of yeoman#950
dbushong
added a commit
to dbushong/generator
that referenced
this issue
Jul 5, 2017
Makes `null` content (file deletion): 1. not identify as binary (so default diff style is nicer) 2. not break binary diff if it is Addresses regression(?) of yeoman#950
SBoudrias
pushed a commit
that referenced
this issue
Jul 24, 2017
Makes `null` content (file deletion): 1. not identify as binary (so default diff style is nicer) 2. not break binary diff if it is Addresses regression(?) of #950
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After calling
this.fs.delete(foo.txt)
The generator asks
Then if you chose
d
to show the diff, the generator crashes withTypeError: Cannot read property 'length' of null
This is because newFileContents is null in binary-diff.js and a call to newFileContents.length is made.
Also note that the existing foo.txt is a text file so the text diff should have been used instead of the binary but
istextorbinary.isBinarySync(undefined, newFileContents)
returns true.The text was updated successfully, but these errors were encountered: