Skip to content

Commit

Permalink
This fixes cases where apostrophes are present in pathnames
Browse files Browse the repository at this point in the history
  • Loading branch information
Ron Korving committed Nov 27, 2017
1 parent e9129a3 commit 0182eaf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/hook.template.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ exports.generatedMessage = 'Generated by ghooks. Do not edit this file.'
exports.content = fs
.readFileSync(resolve(`${__dirname}/hook.template.raw`), 'UTF-8')
.replace('{{generated_message}}', exports.generatedMessage)
.replace('{{node_modules_path}}', join(process.cwd(), '..').replace(/\\/g, '\\\\'))
.replace('{{node_modules_path}}', join(process.cwd(), '..').replace(/\\/g, '\\\\').replace(/'/g, '\\\''))

0 comments on commit 0182eaf

Please sign in to comment.