From 99421219b1266f66aa8853c24992bd711ee73307 Mon Sep 17 00:00:00 2001 From: giginet Date: Tue, 3 Jun 2025 10:45:41 +0900 Subject: [PATCH] Fix sample usage of closure --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4a9eccd..9428d42 100644 --- a/README.md +++ b/README.md @@ -67,9 +67,9 @@ import Subprocess let result = try await run( .path("/bin/dd"), arguments: ["if=/path/to/document"] -) { execution in +) { execution, _, standardOutput, _ in var contents = "" - for try await chunk in execution.standardOutput { + for try await chunk in standardOutput { let string = chunk.withUnsafeBytes { String(decoding: $0, as: UTF8.self) } contents += string if string == "Done" {