Skip to content

Add option to set environment variables only for being run process #4505

Open
@mikhail-m1

Description

@mikhail-m1

It'll be great to add -e NAME=value(for example) flag to cargo run for set environment variables. Setting environment variables is platform/shell dependent and required additional steps from user.

Simplest use case is RUST_LOG, of cause its possible to add filters by main module name, but what about dependent modules? May be it will be useful for set some LD_* fields which may break cargo itself.

EDIT (ehuss): and the ability to unset environment variables. See #7790.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions