Skip to content

Commit

Permalink
Merge pull request #35 from CauldronDevelopmentLLC/master
Browse files Browse the repository at this point in the history
Fix for synchronous rendering failure due to change in node.js child_process API
  • Loading branch information
RobLoach committed Oct 5, 2020
2 parents 90ac7c6 + 0d80411 commit 582f0e1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ exports.render = function (str, options, locals) {
}

// Spawn a browserify process synchronously
const output = cp.execSync(
`node ${browserifyPath} text ${stringifyForCli(str)} ${stringifyForCli(options)}`
const o = cp.spawnSync(
'node', [browserifyPath, 'text', stringifyForCli(str), stringifyForCli(options)]
)

return output.toString()
return o.output.toString()
}

exports.renderAsync = function (str, options, locals) {
Expand Down

0 comments on commit 582f0e1

Please sign in to comment.