Skip to content

cargo --features takes lists in more ways than space-separated #8381

@mulimoen

Description

@mulimoen

Problem

Might be a nit-picky, but cargo b --help lists --features as taking a space-separated list of features. The normal way to invoke features seems to be to use a comma-separated list (easier as this does not require quoting when invoking). This is however not documented. Is this supported and should the help text be changed?

Steps

  1. cargo b --features "feat1 feat2"
  2. cargo b --features "feat1,feat2"

Both enable the features feat1 and feat2, using different separators.

Possible Solution(s)

Change the help text in cargo --help for --features to
Space- or comma-separated list of features to activate

Notes

Output of cargo version:
cargo 1.45.0-nightly (40ebd52 2020-06-01)

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