Skip to content

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

Open
@austenc

Description

@austenc

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

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:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions