File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 11const colors = require ( 'chalk' )
22const figures = require ( 'figures' )
33const { maskSensitiveData } = require ( 'invisi-data' )
4+ const Step = require ( './step' )
45
56const styles = {
67 error : colors . bgRed . white . bold ,
@@ -115,7 +116,7 @@ module.exports = {
115116 }
116117 }
117118
118- try {
119+ if ( step instanceof Step ) {
119120 let stepLine = step . toCliStyled ( )
120121 if ( step . metaStep && outputLevel >= 1 ) {
121122 // this.stepShift += 2;
@@ -127,9 +128,11 @@ module.exports = {
127128
128129 const _stepLine = isMaskedData ( ) ? maskSensitiveData ( stepLine ) : stepLine
129130 print ( ' ' . repeat ( this . stepShift ) , truncate ( _stepLine , this . spaceShift ) )
130- } catch ( e ) {
131+ } else if ( typeof step === 'string' ) {
131132 // sometimes the step is just the string, so we basically print it out
132133 print ( step )
134+ } else {
135+ console . log ( `Something went wrong with ${ step } ` )
133136 }
134137 } ,
135138
You can’t perform that action at this time.
0 commit comments