Skip to content

Commit f0dcf96

Browse files
fix(cli): add single-instance autostart init code (#13980)
1 parent 196ace3 commit f0dcf96

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"tauri-cli": patch:bug
3+
"@tauri-apps/cli": patch:bug
4+
---
5+
6+
Fix the generated plugin init code of `tauri add` for `tauri-plugin-autostart` and `tauri-plugin-single-instance`

crates/tauri-cli/src/add.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ pub fn run(options: Options) -> Result<()> {
130130
"Builder::new(|pass| todo!()).build()"
131131
} else if plugin == "localhost" {
132132
"Builder::new(todo!()).build()"
133+
} else if plugin == "single-instance" {
134+
"init(|app, args, cwd| {})"
133135
} else if metadata.builder {
134136
"Builder::new().build()"
135137
} else {

crates/tauri-cli/src/helpers/plugins.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ pub fn known_plugins() -> HashMap<&'static str, PluginMetadata> {
3838

3939
// uses builder pattern
4040
for p in [
41+
"autostart",
4142
"global-shortcut",
4243
"localhost",
4344
"log",

0 commit comments

Comments
 (0)