chore(swabble): apply swiftformat
This commit is contained in:
@@ -15,16 +15,16 @@ struct TestHookCommand: ParsableCommand {
|
||||
|
||||
init(parsed: ParsedValues) {
|
||||
self.init()
|
||||
if let positional = parsed.positional.first { self.text = positional }
|
||||
if let cfg = parsed.options["config"]?.last { self.configPath = cfg }
|
||||
if let positional = parsed.positional.first { text = positional }
|
||||
if let cfg = parsed.options["config"]?.last { configPath = cfg }
|
||||
}
|
||||
|
||||
mutating func run() async throws {
|
||||
let cfg = try ConfigLoader.load(at: self.configURL)
|
||||
let cfg = try ConfigLoader.load(at: configURL)
|
||||
let runner = HookRunner(config: cfg)
|
||||
try await runner.run(job: HookJob(text: self.text, timestamp: Date()))
|
||||
try await runner.run(job: HookJob(text: text, timestamp: Date()))
|
||||
print("hook invoked")
|
||||
}
|
||||
|
||||
private var configURL: URL? { self.configPath.map { URL(fileURLWithPath: $0) } }
|
||||
private var configURL: URL? { configPath.map { URL(fileURLWithPath: $0) } }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user