We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df90f9f commit 7211b67Copy full SHA for 7211b67
Sources/markdown-tool/Commands/FormatCommand.swift
@@ -126,16 +126,11 @@ extension MarkdownCommand {
126
/// Search for the an executable with a given base name.
127
func findExecutable(named name: String) throws -> String? {
128
let which = Process()
129
+ which.launchPath = "/usr/bin/which"
130
which.arguments = [name]
131
let standardOutput = Pipe()
132
which.standardOutput = standardOutput
- 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
- }
+ which.launch()
139
which.waitUntilExit()
140
141
guard which.terminationStatus == 0,
0 commit comments