2026-02-22 10:26:06 +01:00
|
|
|
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 {
|
2026-03-19 14:14:28 +02:00
|
|
|
let extracted = ExecWrapperResolution.extractShellWrapperCommand(command, rawCommand: rawCommand)
|
|
|
|
|
return ParsedShellWrapper(isWrapper: extracted.isWrapper, command: extracted.command)
|
2026-02-22 10:26:06 +01:00
|
|
|
}
|
|
|
|
|
}
|