File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Plugins/Swift-DocC Convert Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,18 @@ import PackagePlugin
32
32
let verbose = argumentExtractor. extractFlag ( named: " verbose " ) > 0
33
33
let isCombinedDocumentationEnabled = argumentExtractor. extractFlag ( named: PluginFlag . enableCombinedDocumentationSupportFlagName) > 0
34
34
35
+ if isCombinedDocumentationEnabled {
36
+ let doccFeatures = try ? DocCFeatures ( doccExecutable: doccExecutableURL)
37
+ guard doccFeatures? . contains ( . linkDependencies) == true else {
38
+ // The developer uses the combined documentation plugin flag with a DocC version that doesn't support combined documentation.
39
+ Diagnostics . error ( """
40
+ Unsupported use of '-- \( PluginFlag . enableCombinedDocumentationSupportFlagName) '. \
41
+ DocC version at ' \( doccExecutableURL. path) ' doesn't support combined documentation.
42
+ """ )
43
+ return
44
+ }
45
+ }
46
+
35
47
// Parse the given command-line arguments
36
48
let parsedArguments = ParsedArguments ( argumentExtractor. remainingArguments)
37
49
You can’t perform that action at this time.
0 commit comments