File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 11'use strict' ;
22
3+ const os = require ( 'os' ) ;
34const { debug, printer } = require ( '@axiosleo/cli-tool' ) ;
45const Validator = require ( 'validatorjs' ) ;
56const is = require ( '@axiosleo/cli-tool/src/helper/is' ) ;
@@ -166,8 +167,16 @@ async function response(context) {
166167 context . response = response ;
167168 if ( context . app . config . debug ) {
168169 printer . yellow ( '[DEBUG] ' ) ;
169- if ( context . response . data ) {
170- debug . log ( 'response' , context . response . data ) ;
170+ if ( context . response . stack ) {
171+ let tmp = context . response . stack . split ( os . EOL ) ;
172+ if ( tmp [ 3 ] ) {
173+ let t = tmp [ 3 ] . trim ( ) ;
174+ if ( t . startsWith ( 'at /' ) ) {
175+ printer . print ( 'response ' . data ) . print ( tmp [ 3 ] . trim ( ) . warning ) . println ( ) ;
176+ }
177+ }
178+ // eslint-disable-next-line no-console
179+ console . log ( context . response . data ) ;
171180 } else {
172181 debug . log ( 'response' , context . response ) ;
173182 }
You can’t perform that action at this time.
0 commit comments