fix: show exec approval alerts for local mac node
This commit is contained in:
@@ -157,9 +157,10 @@ final class ExecApprovalsPromptServer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private enum ExecApprovalsPromptPresenter {
|
enum ExecApprovalsPromptPresenter {
|
||||||
@MainActor
|
@MainActor
|
||||||
static func prompt(_ request: ExecApprovalPromptRequest) -> ExecApprovalDecision {
|
static func prompt(_ request: ExecApprovalPromptRequest) -> ExecApprovalDecision {
|
||||||
|
NSApp.activate(ignoringOtherApps: true)
|
||||||
let alert = NSAlert()
|
let alert = NSAlert()
|
||||||
alert.alertStyle = .warning
|
alert.alertStyle = .warning
|
||||||
alert.messageText = "Allow this command?"
|
alert.messageText = "Allow this command?"
|
||||||
|
|||||||
@@ -485,10 +485,8 @@ actor MacNodeRuntime {
|
|||||||
|
|
||||||
var approvedByAsk = false
|
var approvedByAsk = false
|
||||||
if requiresAsk {
|
if requiresAsk {
|
||||||
let decision = await ExecApprovalsSocketClient.requestDecision(
|
let decision: ExecApprovalDecision? = await ExecApprovalsPromptPresenter.prompt(
|
||||||
socketPath: approvals.socketPath,
|
ExecApprovalPromptRequest(
|
||||||
token: approvals.token,
|
|
||||||
request: ExecApprovalPromptRequest(
|
|
||||||
command: displayCommand,
|
command: displayCommand,
|
||||||
cwd: params.cwd,
|
cwd: params.cwd,
|
||||||
host: "node",
|
host: "node",
|
||||||
|
|||||||
Reference in New Issue
Block a user