Skip to content

Commit 7211b67

Browse files
committed
Revert "Fix deprecated launch and launchPath API on Process"
This reverts commit df90f9f.
1 parent df90f9f commit 7211b67

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

Sources/markdown-tool/Commands/FormatCommand.swift

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,16 +126,11 @@ extension MarkdownCommand {
126126
/// Search for the an executable with a given base name.
127127
func findExecutable(named name: String) throws -> String? {
128128
let which = Process()
129+
which.launchPath = "/usr/bin/which"
129130
which.arguments = [name]
130131
let standardOutput = Pipe()
131132
which.standardOutput = standardOutput
132-
if #available(macOS 10.13, *) {
133-
which.executableURL = URL(fileURLWithPath: "/usr/bin/which")
134-
try which.run()
135-
} else {
136-
which.launchPath = "/usr/bin/which"
137-
which.launch()
138-
}
133+
which.launch()
139134
which.waitUntilExit()
140135

141136
guard which.terminationStatus == 0,

0 commit comments

Comments
 (0)