-
Notifications
You must be signed in to change notification settings - Fork 60
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
SPDX tag-value parsing fails for CRLF terminated file #198
Comments
I was trying to run this, and I encountered this error
cc @kzantow |
A quick look makes me think It's possible the input could be sanitized here or the location in the first link could add a split function as the SO answer example. |
Thanks for the suggestion, I tried to make the change but when I tried to test it, I ran into this error
which I had previously ran into, this error is not related to the CRLF. How do I test this change? cc: @kzantow |
@neilnaveen one way is just do delete a bunch of lines out of that file, just making sure to save it with some pertinent |
how and where do I load a valid spdx TV file so that I can test this? |
@neilnaveen you can look in the tests, for one: https://github.com/spdx/tools-golang/tree/main/examples/sample-docs/tv |
Also, to compare the problematic/good sbom, you can try :
|
The attached file fails to parse with the following error message (please remove .txt before processing)
Error: error processing file
This is likely due to its CRLF line endings. After saving with a sane line ending, parsing succeeds.
It parses successfully with online validator and spdx/tools-python
cbor-sbom.spdx.txt
The text was updated successfully, but these errors were encountered: