Change timing to obtain scriptiong result data (#1397)

This commit is contained in:
1024jp 2022-12-01 22:03:27 +09:00
parent 43823e387b
commit 994481171c
2 changed files with 5 additions and 2 deletions

View File

@ -14,8 +14,9 @@ Change Log
- Fix an issue on macOS 13 that the table in the Multiple Replace dialog was corrupted when switching the set.
- Fix an issue that a file extension was appended to the file by saving even when the syntax style has no extensions.
- Fix an issue that the line number view did occasioinally not widen even when the number exceeds 4 digits.
- Fix an issue that the line number view did occasionally not widen even when the number exceeds 4 digits.
- Fix an issue that an unwanted extra blank document was created when creating a new document with the selection by Services under specific conditions.
- Address an issue that the scripting result could be corrupted under some specific conditions.

View File

@ -140,7 +140,9 @@ final class UnixScript: Script {
let outputStorage = DataStorage()
if outputType != nil {
outPipe.fileHandleForReading.readabilityHandler = { (handle) in
Task { await outputStorage.append(handle.availableData) }
let data = handle.availableData
guard !data.isEmpty else { return }
Task { await outputStorage.append(data) }
}
}