openclaw/apps/macos/Sources/OpenClaw/ExecShellWrapperParser.swift

16 lines
525 B
Swift
Raw Normal View History

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)
}
}