Skip to content

Accept and ignore a shebang (#!) before a YAML frontmatter (//|) #6708

@lefou

Description

@lefou

Java since version 11 allows a shebang in source files. Also Kotlin scripts (.kts) accept it. To allow Java/Kotlin scripts to also being used as Mill single file scripts Mill needs to accept (and ignore) a shebang in the first line, but still read the YAML frontmatter starting in the second line.

A second use case would be self-executable single file scripts starting with

#!/usr/bin/env mill

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions