openclaw/apps/macos/Sources/OpenClaw/ExecShellWrapperParser.swift
2026-03-19 14:14:28 +02:00

16 lines
525 B
Swift

import Foundation
enum ExecShellWrapperParser {
struct ParsedShellWrapper {
let isWrapper: Bool
let command: String?
static let notWrapper = ParsedShellWrapper(isWrapper: false, command: nil)
}
static func extract(command: [String], rawCommand: String?) -> ParsedShellWrapper {
let extracted = ExecWrapperResolution.extractShellWrapperCommand(command, rawCommand: rawCommand)
return ParsedShellWrapper(isWrapper: extracted.isWrapper, command: extracted.command)
}
}