Skip to content

Commit a7c394f

Browse files
committed
fix: linux
1 parent 158e010 commit a7c394f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Sources/BinaryDependencyManager/DepeneciesResolverRunner.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ struct DependenciesResolverRunner {
6262

6363
private func resolveGithibCLIPath() throws -> String {
6464
let process = Process()
65-
process.launchPath = "/usr/bin/which"
65+
process.executableURL = URL(fileURLWithPath: "/usr/bin/which")
6666
process.arguments = ["gh"]
6767
let pipe = Pipe()
6868
process.standardOutput = pipe
69-
process.launch()
69+
try process.run()
7070
process.waitUntilExit()
7171
let data = pipe.fileHandleForReading.readDataToEndOfFile()
7272
guard let githubCommandLineToolPath = String(data: data, encoding: .utf8)?.trimmingCharacters(in: .whitespacesAndNewlines) else {

Sources/BinaryDependencyManager/main.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ import ArgumentParser
22
import Foundation
33

44
// Making sure that output will be shown immediately, as it comes in the script
5+
#if os(macOS)
56
setbuf(__stdoutp, nil)
7+
#elseif os(Linux)
8+
setbuf(stdout, nil)
9+
#endif
610

711
struct BinaryDependenciesManager: ParsableCommand {
812

0 commit comments

Comments
 (0)