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