Skip to content
This repository was archived by the owner on May 29, 2025. It is now read-only.

Commit 8f03d26

Browse files
Swift format
1 parent eca280d commit 8f03d26

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

MCPClient/Sources/stdioTransport/DataChannel+StdioProcess.swift

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ extension JSONRPCSetupError: LocalizedError {
4444

4545
extension Transport {
4646

47-
// MARK: Public
48-
4947
/// Creates a new `Transport` by launching the given executable with the specified arguments and attaching to its standard IO.
5048
public static func stdioProcess(
5149
_ executable: String,
@@ -218,7 +216,7 @@ extension Transport {
218216

219217
// When userEnv exists, we need to explicitly export these variables in the shell
220218
// before running printenv so they're included in the environment output
221-
if let userEnv = userEnv, !userEnv.isEmpty {
219+
if let userEnv, !userEnv.isEmpty {
222220
var exportCommands = userEnv.map { key, value in
223221
"export \(key)=\(value.replacingOccurrences(of: "\"", with: "\\\""))"
224222
}.joined(separator: "; ")
@@ -248,10 +246,10 @@ extension Transport {
248246
return outputString
249247
.split(separator: "\n")
250248
.reduce(into: [String: String]()) { result, line in
251-
// Parse the env variable key / value
252-
let components = line.split(separator: "=", maxSplits: 1)
253-
guard components.count == 2 else { return }
254-
result[String(components[0])] = String(components[1])
249+
// Parse the env variable key / value
250+
let components = line.split(separator: "=", maxSplits: 1)
251+
guard components.count == 2 else { return }
252+
result[String(components[0])] = String(components[1])
255253
}
256254
}
257255

0 commit comments

Comments
 (0)