Skip to content
This repository was archived by the owner on Oct 17, 2021. It is now read-only.

Commit b4bcd4d

Browse files
authored
Merge pull request #2 from JaapWijnen/ubuntu-illegal-instruction-fix
fixed ubuntu Illegal Instruction issue
2 parents 6a89c4a + fa7eece commit b4bcd4d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Sources/DOT/Graph+Rendering.swift

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,6 @@ extension Graph {
4444
task.arguments = ["-T", format.rawValue]
4545

4646
let inputPipe = Pipe()
47-
inputPipe.fileHandleForWriting.writeabilityHandler = { fileHandle in
48-
fileHandle.write(encoded.data(using: .utf8)!)
49-
inputPipe.fileHandleForWriting.closeFile()
50-
}
5147
task.standardInput = inputPipe
5248

5349
var data = Data()
@@ -65,9 +61,11 @@ extension Graph {
6561
task.launch()
6662
}
6763

64+
inputPipe.fileHandleForWriting.write(Data(encoded.utf8))
65+
inputPipe.fileHandleForWriting.closeFile()
66+
6867
task.waitUntilExit()
6968

7069
return data
7170
}
7271
}
73-

0 commit comments

Comments
 (0)