@@ -7,8 +7,7 @@ struct GenerateDocsReferencePlugin: CommandPlugin {
77 arguments: [ String ]
88 ) async throws {
99 // Locate generation tool.
10- let generationToolFile = try context. tool ( named: " generate-docs-reference " ) . path
11-
10+ let generationToolFile = try context. tool ( named: " generate-docs-reference " ) . url
1211 // Create an extractor to extract plugin-only arguments from the `arguments`
1312 // array.
1413 var extractor = ArgumentExtractor ( arguments)
@@ -52,18 +51,20 @@ struct GenerateDocsReferencePlugin: CommandPlugin {
5251 guard builtArtifact. kind == . executable else { continue }
5352
5453 // Get the artifacts name.
55- let executableName = builtArtifact. path . lastComponent
54+ let executableName = builtArtifact. url . lastPathComponent
5655
5756 print ( " Generating docs reference for \( executableName) ... " )
5857
59- let outputFile = context. package . directory
60- . appending ( " Documentation/SwiftlyDocs.docc/swiftly-cli-reference.md " )
58+ let outputFile = context. package . directoryURL
59+ . appendingPathComponent ( " Documentation " )
60+ . appendingPathComponent ( " SwiftlyDocs.docc " )
61+ . appendingPathComponent ( " swiftly-cli-reference.md " )
6162
6263 // Create generation tool arguments.
6364 var generationToolArguments = [
64- builtArtifact. path . string ,
65+ builtArtifact. url . path ( percentEncoded : false ) ,
6566 " --output-file " ,
66- outputFile. string ,
67+ outputFile. path ( percentEncoded : false ) ,
6768 ]
6869 generationToolArguments. append (
6970 contentsOf: extractor. remainingArguments)
0 commit comments