mirror of
https://github.com/tauri-apps/tauri.git
synced 2026-01-31 00:35:19 +01:00
fix(cli): add single-instance autostart init code (#13980)
This commit is contained in:
6
.changes/add-code-single-instance-autostart.md
Normal file
6
.changes/add-code-single-instance-autostart.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"tauri-cli": patch:bug
|
||||
"@tauri-apps/cli": patch:bug
|
||||
---
|
||||
|
||||
Fix the generated plugin init code of `tauri add` for `tauri-plugin-autostart` and `tauri-plugin-single-instance`
|
||||
@@ -130,6 +130,8 @@ pub fn run(options: Options) -> Result<()> {
|
||||
"Builder::new(|pass| todo!()).build()"
|
||||
} else if plugin == "localhost" {
|
||||
"Builder::new(todo!()).build()"
|
||||
} else if plugin == "single-instance" {
|
||||
"init(|app, args, cwd| {})"
|
||||
} else if metadata.builder {
|
||||
"Builder::new().build()"
|
||||
} else {
|
||||
|
||||
@@ -38,6 +38,7 @@ pub fn known_plugins() -> HashMap<&'static str, PluginMetadata> {
|
||||
|
||||
// uses builder pattern
|
||||
for p in [
|
||||
"autostart",
|
||||
"global-shortcut",
|
||||
"localhost",
|
||||
"log",
|
||||
|
||||
Reference in New Issue
Block a user