Skip to content

env: currently tries to parse too many arguments #7750

@BenWiederhake

Description

@BenWiederhake
$ env echo gotcha -u=kQ4dALb1 A=0d  CZj=lYr
gotcha -u=kQ4dALb1 A=0d CZj=lYr
$ cargo run -q env echo gotcha -u=kQ4dALb1 A=0d  CZj=lYr
env: cannot unset '=kQ4dALb1': Invalid argument
[$? = 125]
$ env -i -- -u=kQ4dALb1 A=0d  CZj=lYr
-u=kQ4dALb1
A=0d
CZj=lYr
$ cargo run -q env -i -- -u=kQ4dALb1 A=0d  CZj=lYr
env: cannot unset '=kQ4dALb1': Invalid argument
[$? = 125]

Recovered from #6172, which tried to add a test for this (but didn't fix it).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions