shebang comment parsing is too lenient #321

Closed
opened 2025-12-30 01:23:31 +01:00 by adam · 0 comments
Owner

Originally created by @bioball on GitHub (Jul 16, 2025).

The shebang comment should only be valid to start a file, but currently is accepted in any position.

This is okay:

#!/usr/bin/env pkl eval

foo = 1

This should error:

foo = 1

#!/usr/bin/env pkl eval
Originally created by @bioball on GitHub (Jul 16, 2025). The shebang comment should only be valid to start a file, but currently is accepted in any position. This is okay: ```pkl #!/usr/bin/env pkl eval foo = 1 ``` This should error: ```pkl foo = 1 #!/usr/bin/env pkl eval ```
adam added the bug label 2025-12-30 01:23:31 +01:00
adam closed this issue 2025-12-30 01:23:31 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pkl#321