File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
Plugins/SwiftProtobufPlugin Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -179,8 +179,8 @@ struct SwiftProtobufPlugin {
179179 ) -> Command {
180180 // Construct the `protoc` arguments.
181181 var protocArgs = [
182- " --plugin=protoc-gen-swift= \( protocGenSwiftPath. path ( ) ) " ,
183- " --swift_out= \( outputDirectory. path ( ) ) " ,
182+ " --plugin=protoc-gen-swift= \( protocGenSwiftPath. fileSystemPath ) " ,
183+ " --swift_out= \( outputDirectory. fileSystemPath ) " ,
184184 ]
185185
186186 let protoDirectory =
@@ -191,7 +191,7 @@ struct SwiftProtobufPlugin {
191191 }
192192
193193 protocArgs. append ( " -I " )
194- protocArgs. append ( protoDirectory. path ( ) )
194+ protocArgs. append ( protoDirectory. fileSystemPath )
195195
196196 // Add the visibility if it was set
197197 if let visibility = invocation. visibility {
@@ -272,6 +272,16 @@ extension SwiftProtobufPlugin: BuildToolPlugin {
272272 }
273273}
274274
275+ extension URL {
276+ fileprivate var fileSystemPath : String {
277+ #if canImport(Darwin)
278+ return self . path ( percentEncoded: false )
279+ #else
280+ return self . path ( )
281+ #endif
282+ }
283+ }
284+
275285#if canImport(XcodeProjectPlugin)
276286import XcodeProjectPlugin
277287
You can’t perform that action at this time.
0 commit comments