Only allow shebangs in the beginning of a module (#1126)

This commit is contained in:
Islon Scherer authored and GitHub committed 2025-07-18 11:18:45 +02:00
1 parent decb4ea66e
commit ba82c5c6d6
6 files changed
+20 -4

No files matched your search

@@ -0,0 +1,2 @@
foo = 1
#!/usr/bin/env pkl eval
@@ -0,0 +1,2 @@
#!/usr/bin/env pkl eval
foo = 1
@@ -0,0 +1,6 @@
–– Pkl Error ––
Invalid token at position. Expected a class, typealias, method, or property.
x | #!/usr/bin/env pkl eval
^^^^^^^^^^^^^^^^^^^^^^^
at shebang (file:///$snippetsDir/input/errors/shebang.pkl)
@@ -0,0 +1 @@
foo = 1