Skip to content

tauri-plugin-shell :program not allowed on the configured shell scope: exec-sh #2527

Open
@yuanhaotian

Description

@yuanhaotian

src-tauri/capabilities/default.json
"permissions": [
"core:default",
"opener:default",
"shell:default",
{
"identifier": "shell:allow-execute",
"allow": [
{
"name": "exec-sh",
"cmd": "sh",
"args": [
"-c",
{
"validator": "\S+"
}
],
"sidecar": false
}
]
}
]

js
let result = await Command.create('exec-sh', [
'-c',
"echo 'Hello World!'",
]).execute();

error:program not allowed on the configured shell scope: exec-sh

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions