File tree Expand file tree Collapse file tree
packages/app/src/cli/commands/app/config Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,8 +63,12 @@ export default class Validate extends AppLinkedCommand {
6363 } )
6464 app = context . app
6565 } catch ( err ) {
66- if ( err instanceof AbortError && flags . json ) {
67- const message = unstyled ( stringifyMessage ( err . message ) ) . trim ( )
66+ // Only catch config validation errors for JSON output. Auth/linking/remote
67+ // failures should propagate normally — they aren't validation results.
68+ // This is a workaround while we consider more granular error types -- today most everything is AbortError.
69+ const message = err instanceof AbortError ? unstyled ( stringifyMessage ( err . message ) ) . trim ( ) : ''
70+ const isValidationError = message . startsWith ( 'Validation errors in ' )
71+ if ( isValidationError && flags . json ) {
6872 outputResult ( JSON . stringify ( { valid : false , issues : [ { message} ] } , null , 2 ) )
6973 throw new AbortSilentError ( )
7074 }
You can’t perform that action at this time.
0 commit comments