Skip to content

Commit ec0fe13

Browse files
committed
Show help if script is not passed + close not async
1 parent 27adc23 commit ec0fe13

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/simulator.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ if (argv.help) {
2424
main().catch(onerror)
2525

2626
async function main () {
27-
if (!argv._.length) throw new Error('Must provide a script for the simulator to run.')
27+
if (!argv._.length) return console.error(help)
2828
const scriptPath = p.resolve(argv._[0])
2929
const simulatorId = `hyperspace-simulator-${process.pid}`
3030
process.env.HYPERSPACE_SOCKET = simulatorId
@@ -45,7 +45,7 @@ async function main () {
4545
})
4646
child.on('close', close)
4747

48-
async function close () {
48+
function close () {
4949
console.log('Shutting down simulator...')
5050
server.close().catch(onerror)
5151
}

0 commit comments

Comments
 (0)