Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spurious "invalid key" warning/error when running cargo install --git https://github.com/sharkdp/bat #3144

Open
joliss opened this issue Dec 5, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@joliss
Copy link

joliss commented Dec 5, 2024

It has been a while since the latest release, so I tried installing from git. This works, but it produces a spurious "invalid key" error:

~ $ cargo install --git https://github.com/sharkdp/bat
    Updating git repository `https://github.com/sharkdp/bat`
error: invalid key
 --> .cargo/git/checkouts/bat-fb566b99108faee0/0cde716/tests/syntax-tests/highlighted/TOML/Cargo.toml:1:1
  |
1 | [package]
  | ^
  |
  Installing bat v0.24.0 (https://github.com/sharkdp/bat#0cde7167)
    Updating crates.io index
     Locking 177 packages to latest compatible versions
      Adding thiserror v1.0.69 (available: v2.0.4)
      Adding unicode-width v0.1.14 (available: v0.2.0)
   Compiling proc-macro2 v1.0.92
   Compiling unicode-ident v1.0.14
   Compiling libc v0.2.167
   Compiling shlex v1.3.0
   ...
   Compiling linked-hash-map v0.5.6
   Compiling bytemuck v1.20.0
   Compiling bitflags v1.3.2
   Compiling bat v0.24.0 (/home/ubuntu/.cargo/git/checkouts/bat-fb566b99108faee0/0cde716)
   Compiling url v2.5.4
   Compiling yaml-rust v0.4.5
   ...
   Compiling onig v6.4.0
   Compiling syntect v5.2.0
   Compiling git2 v0.19.0
    Finished `release` profile [optimized] target(s) in 46.59s
  Installing /home/ubuntu/.cargo/bin/bat
   Installed package `bat v0.24.0 (https://github.com/sharkdp/bat#0cde7167)` (executable `bat`)

This error is actually ignored, so it's more of a warning, but because it said "error", I was pretty confused by it.

It's not visible in my copy-pasted output, but the Cargo.toml that it complains about has ANSI sequences in it, so it makes sense that it can't be parsed. However, I'm not sure why cargo tries to parse it in the first place.

@joliss joliss added the bug Something isn't working label Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant