Skip to content

Commit 124d5c5

Browse files
authored
fix(cli): use snake_case fallback of app_name (#6788)
fix regression introduced in 2b22f64
1 parent 9422490 commit 124d5c5

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.changes/cli-libname-dashes.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'cli.rs': 'patch'
3+
'cli.js': 'patch'
4+
---
5+
6+
On mobile, fix regression introduced in `tauri-cli` version `2.0.0-alpha.3` where library not found error was thrown.

tooling/cli/src/mobile/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ use crate::{
1212
interface::{AppInterface, AppSettings, DevProcess, Interface, Options as InterfaceOptions},
1313
};
1414
use anyhow::{bail, Result};
15+
use heck::ToSnekCase;
1516
use jsonrpsee::core::client::{Client, ClientBuilder, ClientT};
1617
use jsonrpsee::server::{RpcModule, ServerBuilder, ServerHandle};
1718
use jsonrpsee_client_transport::ws::WsTransportClientBuilder;
@@ -281,7 +282,7 @@ fn get_app(config: &TauriConfig) -> App {
281282
let lib_name = interface
282283
.app_settings()
283284
.lib_name()
284-
.unwrap_or(app_name.clone());
285+
.unwrap_or_else(|| app_name.to_snek_case());
285286

286287
let raw = RawAppConfig {
287288
name: app_name,

0 commit comments

Comments
 (0)