Skip to content

Commit

Permalink
fix: Use path.join instead of string concatenation
Browse files Browse the repository at this point in the history
  • Loading branch information
nprail committed Oct 22, 2020
1 parent 6ba9f92 commit 8ff799b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
const program = require('commander')
const updateNotifier = require('update-notifier')
const fs = require('fs-extra')
const path = require('path')

const reporter = require('./lib/reporter')
const pkg = require('./package.json')
Expand Down Expand Up @@ -51,7 +52,7 @@ const genReport = async (
return process.exit(1)
}

const templateFile = template || `${__dirname}/templates/template.hbs`
const templateFile = template || path.join(__dirname, '/templates/template.hbs')

await reporter(data, templateFile, output, theme)

Expand Down

0 comments on commit 8ff799b

Please sign in to comment.