Skip to content

shellout.arguments() behaves differently with gleescript. #13

@apainintheneck

Description

@apainintheneck

The issue here is that when shellout.arguments() is used with the Erlang platform gleam run -- ARGS works differently from escript SCRIPT ARGS.

gleam run

Shell: gleam run -- one two three
Args: shellout.arguments() == ["one", "two", "three"]

escript

Shell: ./script one two three
Args: shellout.arguments() == ["./script", "one", "two", "three"]

The annoying thing here is how the behavior changes not that one is necessarily more correct than the other. I often use gleam run during testing and expect the compiled escript to behave the same way.

For anyone else running into this issue, the argv library does handle escripts consistently.

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