Skip to content

Commit 35f1854

Browse files
committed
Merge pull request #3293 from marchaefner/master
Fix `child_process.fork` patch
2 parents 5ce0c84 + a6891e4 commit 35f1854

File tree

2 files changed

+14
-18
lines changed

2 files changed

+14
-18
lines changed

lib/coffee-script/register.js

+7-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/register.coffee

+7-6
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,11 @@ if require.extensions
4242
if child_process
4343
{fork} = child_process
4444
binary = require.resolve '../../bin/coffee'
45-
child_process.fork = (path, args = [], options = {}) ->
46-
execPath = if helpers.isCoffee(path) then binary else null
47-
if not Array.isArray args
48-
args = []
49-
options = args or {}
50-
options.execPath or= execPath
45+
child_process.fork = (path, args, options) ->
46+
if helpers.isCoffee path
47+
unless Array.isArray args
48+
options = args or {}
49+
args = []
50+
args = [path].concat args
51+
path = binary
5152
fork path, args, options

0 commit comments

Comments
 (0)