File tree 1 file changed +5
-0
lines changed
1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,8 @@ struct GenerateManual: ParsableCommand {
92
92
93
93
func run( ) throws {
94
94
let data : Data
95
+ // runs the tool with the --experimental-dump-help argument to capture
96
+ // the output.
95
97
do {
96
98
let tool = URL ( fileURLWithPath: tool)
97
99
let output = try executeCommand (
@@ -101,9 +103,12 @@ struct GenerateManual: ParsableCommand {
101
103
throw GenerateManualError . failedToRunSubprocess ( error: error)
102
104
}
103
105
106
+ // ToolInfoHeader is intentionally kept internal to argument parser to
107
+ // allow the library some flexibility to update/change its content/format.
104
108
do {
105
109
let toolInfoThin = try JSONDecoder ( ) . decode (
106
110
ToolInfoHeader . self, from: data)
111
+ // verify the serialization version is known/expected
107
112
guard toolInfoThin. serializationVersion == 0 else {
108
113
throw GenerateManualError . unsupportedDumpHelpVersion (
109
114
expected: 0 ,
You can’t perform that action at this time.
0 commit comments