You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Crashes when given a file that uses Windows's carriage returns.
Spits out the following error:
Encountered an unexpected error
This is a bug in Postgres Tools, not an error in your code, and we would appreciate it if you could report it along with the following information to help us fixing the issue:
Source Location: crates/pgt_lexer/src/lib.rs:181:9
Thread Name: pgt::worker_0
Message: No token found at position 20: 'Some("\r")'
bad.sql internalError/panic INTERNAL ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✖ processing panicked: No token found at position 20: 'Some("\r")'
⚠ This diagnostic was derived from an internal error. Potential bug, please report it if necessary.
Checked 0 files in 1588µs. No fixes applied.
internalError/io ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
✖ No files were processed in the specified paths.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Bug report
bad.txt
Describe the bug
Crashes when given a file that uses Windows's carriage returns.
Spits out the following error:
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
bad.txt
bad.sql
postgrestools check bad.sql
bad.txt
Expected behavior
Should work similar to files written on a UNIX system.
Screenshots
System information
Additional context
I received the file from a friend who uses Windows. Whan I ran the command, it failed. When I wrote the code myself in a new file, it worked fine.
The text was updated successfully, but these errors were encountered: