Skip to content
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

pester complains "file newlines are CRLF" #1377

Closed
Congee opened this issue Mar 16, 2017 · 2 comments
Closed

pester complains "file newlines are CRLF" #1377

Congee opened this issue Mar 16, 2017 · 2 comments

Comments

@Congee
Copy link
Contributor

Congee commented Mar 16, 2017

Got these errors, But it's weird that pester on Appveyor doesn't fail. Also, I pulled from upstream with newest testing scripts. This means this issue may be nonreproducible.

 [-] file newlines are CRLF 85ms
   ArgumentNullException: Value cannot be null.
   Parameter name: input
   MethodInvocationException: Exception calling "Split" with "2" argument(s): "Value cannot be null.
   Parameter name: input"
   at <ScriptBlock>, C:\Users\Congee\Projects\scoop\test\00-Project.Tests.ps1: line 138
Describing manifest-validation
 [+] Scoop.Validator is available 133ms
   Context parse_json function
    [+] fails with invalid json 48ms
   Context schema validation
    [+] fails with broken schema 151ms
    [+] fails with broken manifest 106ms
    [+] fails with invalid manifest 91ms
   Context manifest validates against the schema
    [*] .#fzf.json: Error reading JObject from JsonReader. Path '', line 0, position 0.
    [-] .#fzf.json 100ms
      Expected: {0}
      But was:  {1}
      58:                 $validator.Errors.Count | should be 0
      at <ScriptBlock>, C:\Users\Congee\Projects\scoop\test\Scoop-Manifest.Tests.ps1: line 58

#1374
Annoying, any idea?

@lukesampson
Copy link
Member

It looks like the first error (file newlines are CRLF) is due to an empty file. I've added a few lines to throw an exception and help you work out which file it is.

@Congee
Copy link
Contributor Author

Congee commented Mar 16, 2017

Solved! 🎉
This is because sed created bucket/.#fzf.json when I was trying to remove UTF-8 BOM header bytes.

@Congee Congee closed this as completed Mar 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants