Skip to content

Commit 1380e08

Browse files
committed
squash! apply suggestions
1 parent 32d38ce commit 1380e08

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) {
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

192192
function tapRun () {

0 commit comments

Comments
 (0)