Browse Source

Ensure file path isn't percent encoded in the plugin (#2086)

Motivation:

In Swift 6, SwiftPM deprecated its Path based API for plugins and moved
to Foundation's URL. On Darwin, getting the path of a URL percent
encodes it which leads to build issues in Xcode.

Modifications:

- Make sure the path isn't percent encoded

Result:

- Plugin works again
- Resolves #2085
George Barnett 1 year ago
parent
commit
cfdce0774c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Plugins/GRPCSwiftPlugin/plugin.swift

+ 1 - 1
Plugins/GRPCSwiftPlugin/plugin.swift

@@ -319,7 +319,7 @@ struct PathLike: CustomStringConvertible {
     #if compiler(<6.0)
     return String(describing: self.value)
     #elseif canImport(Darwin)
-    return self.value.path()
+    return self.value.path(percentEncoded: false)
     #else
     return self.value.path
     #endif