Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Crashes on files that use carriage returns. #385

Closed
Assignees
psteinroe
Labels
bugSomething isn't working
@KhalidAlansary

Description

@KhalidAlansary

Bug report

bad.txt

Describe the bug

Crashes when given a file that uses Windows's carriage returns.
Spits out the following error:

Encountered an unexpected errorThis 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:9Thread Name: pgt::worker_0Message: 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:

  1. Download the attachedbad.txt
  2. Rename tobad.sql
  3. runpostgrestools check bad.sql

bad.txt

Expected behavior

Should work similar to files written on a UNIX system.

Screenshots

Image

System information

  • OS: Arch Linux

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp