File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -28,13 +28,17 @@ export function commandWrapper<T extends CommandArgv>(
2828 return async ( argv : Arguments < T > ) => {
2929 let code : ExitCode = 2 ;
3030 let telemetry ;
31- let specVersion : string | undefined ;
31+ let specVersion : string = 'unknown' ;
3232 let specKeyword : string | undefined ;
3333 let specFullVersion : string | undefined ;
3434 let config : Config | undefined ;
3535 const respectXSecurityAuthTypes : string [ ] = [ ] ;
3636 const collectSpecData : CollectFn = ( document ) => {
37- specVersion = detectSpec ( document ) ;
37+ try {
38+ specVersion = detectSpec ( document ) ;
39+ } catch ( err ) {
40+ specVersion = `unsupported` ;
41+ }
3842 if ( ! isPlainObject ( document ) ) return ;
3943 specKeyword = document ?. openapi
4044 ? 'openapi'
You can’t perform that action at this time.
0 commit comments