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
11 changes: 11 additions & 0 deletions Scripts/process.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,17 @@ fi

final_status=0

# SwiftLint needs sourcekitdInProc, which it can't locate on its own when the active developer dir is the Command Line Tools
if [[ -z "$TOOLCHAIN_DIR" ]]; then
developer_dir=$(xcode-select -p 2>/dev/null)
if [[ -d "$developer_dir/Toolchains/XcodeDefault.xctoolchain" ]]; then
export TOOLCHAIN_DIR="$developer_dir/Toolchains/XcodeDefault.xctoolchain"
elif [[ -d "$developer_dir/usr/lib/sourcekitdInProc.framework" ]]; then
export TOOLCHAIN_DIR="$developer_dir"
fi
fi


function process_output() {
printf '\n# Running %s\n' "$1"
local start=$(date +%s)
Expand Down
7 changes: 6 additions & 1 deletion Sources/CryptomatorCloudAccess/Logging/HTTPDebugLogger.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,12 @@ enum HTTPDebugLogger {
return
}
CloudAccessDDLogDebug("<-- \(httpResponse.statusCode) \(HTTPURLResponse.localizedString(forStatusCode: httpResponse.statusCode)) \(response.url?.absoluteString ?? "nil")")
httpResponse.allHeaderFields.reduce(into: [:]) { if let key = $1.key as? String { $0[key] = $1.value } }
httpResponse.allHeaderFields
.reduce(into: [String: Any]()) { result, header in
if let key = header.key as? String {
result[key] = header.value
}
}
.sorted { $0.key.localizedCaseInsensitiveCompare($1.key) == .orderedAscending }
.filter { !isExcludedHeader($0.key) }
.forEach { CloudAccessDDLogDebug("\($0.key): \($0.value)") }
Expand Down
Loading