Skip to content

Review logic for getting CLI arguments #3310

Closed
@scampi

Description

@scampi

In #2694 it seems that our handling of the env::args() is problematic in some environments like windows. The first item is skipped which is usually the executable name, but not always:

The first element is traditionally the path of the executable, but it can be set to arbitrary text, and may not even exist. This means this property should not be relied upon for security purposes.

Since this logic is used in the binaries shipped with rustfmt, it could be better to use another library like clap where that is not needed (I think).

Metadata

Metadata

Assignees

No one assigned

    Labels

    fun!:)good first issueIssues up for grabs, also good candidates for new rustfmt contributors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions