Skip to content

Commit

Permalink
Fixes #432 - Updating to only load the help text when required (#435)
Browse files Browse the repository at this point in the history
  • Loading branch information
klcodanr authored Mar 16, 2022
1 parent 7866489 commit 0a462fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autocannon.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const spawn = require('child_process').spawn
const managePath = require('manage-path')
const hasAsyncHooks = require('has-async-hooks')
const subarg = require('subarg')
const help = fs.readFileSync(path.join(__dirname, 'help.txt'), 'utf8')
const printResult = require('./lib/printResult')
const initJob = require('./lib/init')
const track = require('./lib/progressTracker')
Expand Down Expand Up @@ -119,6 +118,7 @@ function parseArguments (argvs) {
}

if (!checkURL(argv.url) || argv.help) {
const help = fs.readFileSync(path.join(__dirname, 'help.txt'), 'utf8')
console.error(help)
return
}
Expand Down

0 comments on commit 0a462fe

Please sign in to comment.