fix(cli): use snake_case fallback of app_name (#6788)

fix regression introduced in 2b22f64972
This commit is contained in:
Amr Bashir 2023-04-25 23:21:06 +02:00 committed by GitHub
parent 942249060e
commit 124d5c5adf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -0,0 +1,6 @@
---
'cli.rs': 'patch'
'cli.js': 'patch'
---
On mobile, fix regression introduced in `tauri-cli` version `2.0.0-alpha.3` where library not found error was thrown.

View File

@ -12,6 +12,7 @@ use crate::{
interface::{AppInterface, AppSettings, DevProcess, Interface, Options as InterfaceOptions},
};
use anyhow::{bail, Result};
use heck::ToSnekCase;
use jsonrpsee::core::client::{Client, ClientBuilder, ClientT};
use jsonrpsee::server::{RpcModule, ServerBuilder, ServerHandle};
use jsonrpsee_client_transport::ws::WsTransportClientBuilder;
@ -281,7 +282,7 @@ fn get_app(config: &TauriConfig) -> App {
let lib_name = interface
.app_settings()
.lib_name()
.unwrap_or(app_name.clone());
.unwrap_or_else(|| app_name.to_snek_case());
let raw = RawAppConfig {
name: app_name,