Skip to content

flycheck-rust-cargo-has-command-p returns nil incorrectly #1916

@PatrickNorton

Description

@PatrickNorton

Thank you for taking the time to report an issue and improve Flycheck. This template is for actual bugs you observed. If you have trouble setting up Flycheck, or if you have a question, please use the relevant issue template instead.

Checklist

  • I have checked existing issues for potential duplicates before creating this one.
  • I have read the Troubleshooting guide.

Bug description

Running (flycheck-rust-cargo-has-command-p "run") (or any other Cargo command) returns nil when it should return t. This is because flycheck-rust-cargo-has-command-p uses cargo --list as a basis, which returns descriptions for each subcommand (ever since rust-lang/cargo#9848). This means (member command ...) returns nil.

Steps to reproduce

Steps to reproduce the behavior:

  1. Run (flycheck-rust-cargo-has-command-p "run") with a sufficiently recent (>= 1.56) version of Cargo installed.
  2. Observe that it returns nil

Expected behavior

The command should return t when the command is installed

Emacs configuration:

  • Plain Emacs / Custom configuration
  • Spacemacs
  • Doom Emacs
  • Other shared configuration

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