tauri-apps / tauri-apps/plugins-workspace

[v2] Shell Sidecars always run commands with args from tauri.conf.json when invoked with JS bindings

Open
#687 3 comments 0 reactions 0 assignees View on GitHub
plugin: shell type: bug type: feature request
Dominant language
Rust
Stars
1.8k
Forks
602
Avg merge
4d 14h
Merged PRs (30d)
9

Description

When using a sidecar executable and invoking it with the Javascript bindings, the arguments defined in the `tauri.conf.json` file are always applied automatically. This doesn't happen when invoking it from the Rust side.

Example JS
```js
const test = async () => {
let cmd = Command.sidecar('my-sidecar')

// this actually invokes `my-sidecar -v`
await cmd.spawn()
}
test()
```

Given something like this in `tauri.conf.json`:

```js
"plugins": {
"shell": {
"scope": [{
"name": "my-sidecar",
"sidecar": true,
"args": [
"-v",
]
}]
}
},
"tauri": {
"bundle": {
"active": true,
"targets": "all",
"identifier": "com.example.dev",
"externalBin": [
"php-server"
]
},
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.