Skip to content

Commit e973870

Browse files
committed
Remove unnecessary second callback execution from user CLI stdin handlers
1 parent efac9ea commit e973870

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/cli/_stdin.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
let { emitKeypressEvents } = require('readline')
22
let sandbox = require('../')
33

4-
module.exports = function handleStdin (params, callback) {
4+
module.exports = function handleStdin (params) {
55
let { rehydrate, update, watcher } = params
66

77
// Listen for important keystrokes
@@ -47,7 +47,6 @@ module.exports = function handleStdin (params, callback) {
4747
update.err(err)
4848
process.exit(1)
4949
}
50-
if (callback) callback()
5150
process.exit(0)
5251
})
5352
}

src/cli/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ module.exports = function cli (options, callback) {
3939
}
4040

4141
// Handle stdin
42-
stdin({ rehydrate, update, watcher }, callback)
42+
stdin({ rehydrate, update, watcher })
4343
})
4444
}

0 commit comments

Comments
 (0)