File tree Expand file tree Collapse file tree 1 file changed +21
-21
lines changed
Expand file tree Collapse file tree 1 file changed +21
-21
lines changed Original file line number Diff line number Diff line change @@ -159,34 +159,34 @@ if (args.length === 1 && args[0] === '-') {
159159}
160160
161161function run ( ) {
162- if ( parsed . tap ) {
163- const tap = new Tap ( )
164- tap . pipe ( process . stdout )
165- if ( parsed . out ) tap . pipe ( fs . createWriteStream ( parsed . out ) )
166- let count = 0
167- const total = args . length
168-
169- v . on ( 'commit' , ( c ) => {
170- count ++
171- const test = tap . test ( c . commit . sha )
172- formatTap ( test , c . commit , c . messages , v )
173- if ( count === total ) {
174- setImmediate ( ( ) => {
175- tap . end ( )
176- if ( tap . status === 'fail' ) { process . exitCode = 1 }
177- } )
178- }
179- } )
180-
181- tapRun ( )
182- } else {
162+ if ( ! parsed . tap ) {
183163 v . on ( 'commit' , ( c ) => {
184164 pretty ( c . commit , c . messages , v )
185165 commitRun ( )
186166 } )
187167
188168 commitRun ( )
169+ return
189170 }
171+ const tap = new Tap ( )
172+ tap . pipe ( process . stdout )
173+ if ( parsed . out ) tap . pipe ( fs . createWriteStream ( parsed . out ) )
174+ let count = 0
175+ const total = args . length
176+
177+ v . on ( 'commit' , ( c ) => {
178+ count ++
179+ const test = tap . test ( c . commit . sha )
180+ formatTap ( test , c . commit , c . messages , v )
181+ if ( count === total ) {
182+ setImmediate ( ( ) => {
183+ tap . end ( )
184+ if ( tap . status === 'fail' ) { process . exitCode = 1 }
185+ } )
186+ }
187+ } )
188+
189+ tapRun ( )
190190}
191191
192192function tapRun ( ) {
You can’t perform that action at this time.
0 commit comments