mirror of
https://github.com/kunkunsh/kunkun.git
synced 2025-04-20 13:39:15 +00:00
fix: throw error when extension permission failed. It didn't throw error
This commit is contained in:
parent
646801ac99
commit
f03cb6cbad
@ -85,7 +85,9 @@ export function constructShellApi(
|
|||||||
args: string[],
|
args: string[],
|
||||||
options: InternalSpawnOptions
|
options: InternalSpawnOptions
|
||||||
): Promise<ChildProcess<IOPayload>> {
|
): Promise<ChildProcess<IOPayload>> {
|
||||||
await verifyShellCmdPermission(ShellPermissionMap.execute, objectPermissions, program, args)
|
await verifyShellCmdPermission(ShellPermissionMap.execute, objectPermissions, program, args).catch(err => {
|
||||||
|
throw new Error(err)
|
||||||
|
})
|
||||||
return invoke<ChildProcess<IOPayload>>("plugin:shellx|execute", {
|
return invoke<ChildProcess<IOPayload>>("plugin:shellx|execute", {
|
||||||
program: program,
|
program: program,
|
||||||
args: args,
|
args: args,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user