Skip to content

--config with an alias doesn't work, but produces a confusing error message #10853

Open
@passcod

Description

@passcod

Problem

Using --config with nightly to specify an alias, and then immediately calling that alias, fails with a confusing error message:

$ cargo +nightly --config 'alias.foo="build"' foo

error: no such subcommand: `foo`

        Did you mean `foo`?

Steps

  1. cargo new name
  2. cd name
  3. cargo +nightly --config 'alias.foo="build"' foo

Possible Solution(s)

Either the alias should work, or the error message should change in this case.

Notes

No response

Version

cargo 1.64.0-nightly (dbff32b27 2022-06-24)
release: 1.64.0-nightly
commit-hash: dbff32b27893b899ae2397f3d56d1be111041d56
commit-date: 2022-06-24
host: x86_64-unknown-linux-gnu
libgit2: 1.4.2 (sys:0.14.2 vendored)
libcurl: 7.83.1-DEV (sys:0.4.55+curl-7.83.1 vendored ssl:OpenSSL/1.1.1n)
os: Arch Linux [64-bit]

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-config-cliArea: --config CLI optionC-bugCategory: bugS-triageStatus: This issue is waiting on initial triage.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions