@@ -7,8 +7,7 @@ struct GenerateDocsReferencePlugin: CommandPlugin {
7
7
arguments: [ String ]
8
8
) async throws {
9
9
// 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
12
11
// Create an extractor to extract plugin-only arguments from the `arguments`
13
12
// array.
14
13
var extractor = ArgumentExtractor ( arguments)
@@ -52,18 +51,20 @@ struct GenerateDocsReferencePlugin: CommandPlugin {
52
51
guard builtArtifact. kind == . executable else { continue }
53
52
54
53
// Get the artifacts name.
55
- let executableName = builtArtifact. path . lastComponent
54
+ let executableName = builtArtifact. url . lastPathComponent
56
55
57
56
print ( " Generating docs reference for \( executableName) ... " )
58
57
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 " )
61
62
62
63
// Create generation tool arguments.
63
64
var generationToolArguments = [
64
- builtArtifact. path . string ,
65
+ builtArtifact. url . path ( percentEncoded : false ) ,
65
66
" --output-file " ,
66
- outputFile. string ,
67
+ outputFile. path ( percentEncoded : false ) ,
67
68
]
68
69
generationToolArguments. append (
69
70
contentsOf: extractor. remainingArguments)
0 commit comments