tauri-apps / tauri

Build smaller, faster, and more secure desktop and mobile applications with a web frontend.
https://tauri.app
Apache License 2.0
85.91k stars 2.6k forks source link

[bug] Failed to generate shell completions for bash #7213

Open orhun opened 1 year ago

orhun commented 1 year ago

Describe the bug

For cargo-tauri 1.4.0, I'm getting the following error while generating the shell completions:

        Info Generating completion file for bash...
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /build/.cargo/registry/src/index.crates.io-6f17d22bba15001f/clap_complete-4.3.0/src/generator/utils.rs:26:39
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Reproduction

Run:

cargo-tauri completions --shell bash

Expected behavior

Successful shell completions generation.

Platform and versions

`1.4.0`

Stack trace

-

Additional context

-

orhun commented 1 year ago

Alternatively, see the Arch Linux package which fails to build with bash completions enabled: https://gitlab.archlinux.org/archlinux/packaging/packages/cargo-tauri/-/commit/45b8d3f68390fa89dd325da906cc841714aac9fd

cymruu commented 1 year ago

related clap issue: https://github.com/clap-rs/clap/issues/4996

cymruu commented 3 months ago

new related clap issue: https://github.com/clap-rs/clap/issues/3166