Skip to content

Commit 612ab77

Browse files
committed
Revert "squash! apply suggestions"
This reverts commit 1380e08.
1 parent 1380e08 commit 612ab77

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

bin/cmd.js

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -159,34 +159,34 @@ if (args.length === 1 && args[0] === '-') {
159159
}
160160

161161
function run () {
162-
if (!parsed.tap) {
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 {
163183
v.on('commit', (c) => {
164184
pretty(c.commit, c.messages, v)
165185
commitRun()
166186
})
167187

168188
commitRun()
169-
return
170189
}
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

192192
function tapRun () {

0 commit comments

Comments
 (0)