fix(macos): clean warnings and harden gateway/talk config parsing

This commit is contained in:
Peter Steinberger
2026-02-25 00:27:31 +00:00
parent 9cd50c51b0
commit ce1dbeb986
15 changed files with 331 additions and 284 deletions

View File

@@ -63,11 +63,11 @@ enum ExecShellWrapperParser {
private static func extractPayload(command: [String], spec: WrapperSpec) -> String? {
switch spec.kind {
case .posix:
return self.extractPosixInlineCommand(command)
self.extractPosixInlineCommand(command)
case .cmd:
return self.extractCmdInlineCommand(command)
self.extractCmdInlineCommand(command)
case .powershell:
return self.extractPowerShellInlineCommand(command)
self.extractPowerShellInlineCommand(command)
}
}
@@ -81,7 +81,9 @@ enum ExecShellWrapperParser {
}
private static func extractCmdInlineCommand(_ command: [String]) -> String? {
guard let idx = command.firstIndex(where: { $0.trimmingCharacters(in: .whitespacesAndNewlines).lowercased() == "/c" }) else {
guard let idx = command
.firstIndex(where: { $0.trimmingCharacters(in: .whitespacesAndNewlines).lowercased() == "/c" })
else {
return nil
}
let tail = command.suffix(from: command.index(after: idx)).joined(separator: " ")