tauri-apps / tauri-apps/plugins-workspace
[v2] Shell Sidecars always run commands with args from tauri.conf.json when invoked with JS bindings
- 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
Assessment
This issue has not been assessed yet.