Skip to content

[bug] [v2] Cli outputs wrong "You must enable" code when plugin name have dash #8017

@vasfvitor

Description

@vasfvitor

Describe the bug

"You must enable the plugin in your Rust code:" says:
tauri::Builder::default().plugin(tauri_plugin_clipboard-manager::init())

cli output:
image

code preview:
image

Reproduction

New project with cargo create-tauri-app --alpha -m cargo -t leptos -y

cargo tauri add clipboard-manager
or
cargo tauri add single-instance

Expected behavior

Suggestion should be:
tauri::Builder::default().plugin(tauri_plugin_clipboard_manager::init())

notice clipboard_manager with _ vs -

image

Platform and versions

[✔] Environment
    - OS: Windows 10.0.19045 X64
    ✔ WebView2: 117.0.2045.60
    ✔ MSVC:
        - Ferramentas de Build do Visual Studio 2019
        - Visual Studio Community 2022
    ✔ rustc: 1.73.0 (cc66ad468 2023-10-03)
    ✔ Cargo: 1.73.0 (9c4383fb5 2023-08-26)
    ✔ rustup: 1.26.0 (5af9b9484 2023-04-05)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (environment override by RUSTUP_TOOLCHAIN)
    - node: 18.17.0
    - pnpm: 8.8.0
    - yarn: 1.22.19
    - npm: 9.8.1

[-] Packages
    - tauri [RUST]: 2.0.0-alpha.15
    - tauri-build [RUST]: 2.0.0-alpha.9
    - wry [RUST]: 0.33.1
    - tao [RUST]: 0.22.2
    - @tauri-apps/api [NPM]: not installed!
    - @tauri-apps/cli [NPM]: 2.0.0-alpha.15

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: ../dist
    - devPath: http://localhost:1420/

Stack trace

No response

Additional context

At tauri-docs it's ok. I believe it's only affects cli.

This bug should arise at any plugin that has dash in it's name. As clipboard-manager, single-instance, barcode-scanner...

plugin single-instance:
image

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions