Skip to content

Doesn't work on babashka scripts #3

@fuadsaud

Description

@fuadsaud

Steps to reproduce

Create hello.clj file with the following contents:

#!/usr/bin/env bb

(require '[clojure.java.shell :as sh])

(sh/sh "echo" "Hello")

Run clojure -Sdeps '{:deps {nsorg-cli {:mvn/version "0.3.1"}}}' -m nsorg.cli hello.clj

Actual result

Checking following paths:
hello.clj

Failed to check path hello.clj:
clojure.lang.ExceptionInfo: Invalid token: !/usr/bin/env
{:type :reader-exception}
...

Expected Result

Since babashka scripts share the same file extension with regular Clojure files, a project that uses both clojure and babashka might have problems using extension-based glob patterns for nsorg. Since babashka scripts also have namespace forms, they could benefit from nsorg as well. Would it make sense to somehow account for the hashbang at the beginning of these files as if it were a comment?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions