Skip to content

A leading end-of-options separator does not accept the Bend filename #2304

Backlog

Description

@oxura

What you did

Ran bend -- -program.bend --sample, using -- to separate options from a file whose name begins with a dash.

From source, the equivalent is bun bend2/main.ts -- -- -program.bend --sample because the Bun launcher consumes the first separator.

What happened

Bend exits 1 and prints its usage. bend ./-program.bend -- --sample works; IO.args() gets --sample. A separator before the file should consume the next token as the file, and pass the remaining tokens to the program, rather than treating every token as a program argument without a file.

The file

Any valid file named -program.bend; the example prints IO.args().

bend --version

Bend 2.0.40, upstream 966bbb7435, Bun 1.4.4.

uname -sm

Linux x86_64.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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