Skip to content

shebang marked as error: <form> expected, got '/usr/bin/env' #71

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

Open
devurandom opened this issue Mar 10, 2025 · 0 comments
Open

shebang marked as error: <form> expected, got '/usr/bin/env' #71

devurandom opened this issue Mar 10, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@devurandom
Copy link

devurandom commented Mar 10, 2025

Describe the bug

With the following file:

#!/usr/bin/env bb

(require '[babashka.http-client :as http])

Clojure LSP complains about the / after #!: "

expected, got '/usr/bin/env'".

The file is the start of an example copied from the Babashka documentation: https://book.babashka.org/#_running_a_script

The Clojure docs suggest that a shebang is valid syntax (on the first line of a file): https://clojure.org/guides/faq#clj_standalone

{:final-settings {},
 :classpath nil,
 :cljfmt-raw "nil",
 :analysis-summary
 {"internal" {"keyword-usages" 15905.0, "instance-invocations" 65.0, "protocol-impls" 18.0, "local-usages" 7463.0, "namespace-alias" 565.0, "namespace-usages" 621.0, "symbols" 4.0, "var-usages" 18300.0, "namespace-definitions" 26.0, "java-class-usages" 141.0, "locals" 4372.0, "var-definitions" 1131.0}, "external" {"instance-invocations" 417.0, "protocol-impls" 69.0, "local-usages" 8690.0, "namespace-alias" 17.0, "namespace-usages" 22.0, "symbols" 13.0, "var-usages" 12312.0, "namespace-definitions" 2.0, "java-class-usages" 450.0, "locals" 4850.0, "var-definitions" 1259.0}},
 :client-settings nil,
 :project-root-uri nil,
 :port "NREPL only available on :debug profile (`bb debug-cli`)",
 :project-settings nil,
 :server-version "2025.03.07-17.42.36",
 :clj-kondo-version "2025.02.20",
 :log-path "/tmp/clojure-lsp.3767883027226366171.out",
 :classpath-settings nil}
@devurandom devurandom added the bug Something isn't working label Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

1 participant