Description
See: #2667 (comment)
When it lands, #2667 will bring over the v0.12 changes that improved argument parsing in child_process execFile and fork. However, even with that change, argument parsing is still too ambiguous and ought to be tightened up. For instance, execFile('ls',{a:1},'test')
goes through without a throw even tho a string is passed in for the callback. Internally, execFile just acts as if the callback wasn't provided at all. Likewise, execFile('ls',[], 'test', function() {})
does not throw either. Nor does execFile('ls',[],'test','test')
. The only type that is actually checked is the args, so that if you pass in execFile('ls', 'test')
, a TypeError will throw.
For v4.0.0, the priority is on landing #2667 to ensure parity with v0.12, but moving forward we'll want to tighten up the argument parsing here (and likely in other places as well).
@trevnorris (@nodejs/api)