Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/XcodeProj/Extensions/Path+Extras.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import PathKit
// MARK: - Path extras.

func systemGlob(_ pattern: UnsafePointer<CChar>!, _ flags: Int32, _ errfunc: (@convention(c) (UnsafePointer<CChar>?, Int32) -> Int32)!, _ vector_ptr: UnsafeMutablePointer<glob_t>!) -> Int32 {
#if os(macOS)
#if os(macOS) || os(iOS)
return Darwin.glob(pattern, flags, errfunc, vector_ptr)
#else
return Glibc.glob(pattern, flags, errfunc, vector_ptr)
Expand Down
2 changes: 1 addition & 1 deletion Sources/XcodeProj/Extensions/String+md5.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ extension String {
return self
}
#if canImport(CryptoKit)
if #available(OSX 10.15, *) {
if #available(OSX 10.15, iOS 13.0, *) {
return Insecure.MD5.hash(data: data)
.withUnsafeBytes { Array($0) }.hexString
} else {
Expand Down
4 changes: 4 additions & 0 deletions Tests/XcodeProjTests/Extensions/XCTestCase+Shell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Foundation
/// Returns the output of running `executable` with `args`. Throws an error if the process exits indicating failure.
@discardableResult
func checkedOutput(_ executable: String, _ args: [String]) throws -> String? {
#if os(macOS)
let process = Process()
let output = Pipe()

Expand All @@ -22,4 +23,7 @@ func checkedOutput(_ executable: String, _ args: [String]) throws -> String? {
}

return String(data: output.fileHandleForReading.readDataToEndOfFile(), encoding: .utf8)
#else
return nil
#endif
}