fix(ios): eliminate Swift warnings and clean build logs

This commit is contained in:
Peter Steinberger
2026-02-26 22:42:20 +00:00
parent 22c74d416b
commit c35368c6dd
17 changed files with 250 additions and 115 deletions

View File

@@ -355,9 +355,9 @@ private enum ExecHostExecutor {
static func handle(_ request: ExecHostRequest) async -> ExecHostResponse {
let validatedRequest: ExecHostValidatedRequest
switch ExecHostRequestEvaluator.validateRequest(request) {
case .success(let request):
case let .success(request):
validatedRequest = request
case .failure(let error):
case let .failure(error):
return self.errorResponse(error)
}
@@ -370,7 +370,7 @@ private enum ExecHostExecutor {
context: context,
approvalDecision: request.approvalDecision)
{
case .deny(let error):
case let .deny(error):
return self.errorResponse(error)
case .allow:
break
@@ -401,7 +401,7 @@ private enum ExecHostExecutor {
context: context,
approvalDecision: followupDecision)
{
case .deny(let error):
case let .deny(error):
return self.errorResponse(error)
case .allow:
break

View File

@@ -26,9 +26,9 @@ enum ExecHostRequestEvaluator {
command: command,
rawCommand: request.rawCommand)
switch validatedCommand {
case .ok(let resolved):
case let .ok(resolved):
return .success(ExecHostValidatedRequest(command: command, displayCommand: resolved.displayCommand))
case .invalid(let message):
case let .invalid(message):
return .failure(
ExecHostError(
code: "INVALID_REQUEST",

View File

@@ -22,17 +22,17 @@ enum HostEnvSecurityPolicy {
"PS4",
"GCONV_PATH",
"IFS",
"SSLKEYLOGFILE"
"SSLKEYLOGFILE",
]
static let blockedOverrideKeys: Set<String> = [
"HOME",
"ZDOTDIR"
"ZDOTDIR",
]
static let blockedPrefixes: [String] = [
"DYLD_",
"LD_",
"BASH_FUNC_"
"BASH_FUNC_",
]
}