From c400fcb443f0873e4db019c744f8dbf5ec8ba951 Mon Sep 17 00:00:00 2001 From: John Vilk Date: Thu, 23 Jan 2014 16:57:43 -0500 Subject: [PATCH] Fixing a bug on the 'opts' attribute on the first argument to grunt.util.spawn. The 'opts' property on ISpawnOptions specifies "Additional options for the Node.js child_process spawn method." according to http://gruntjs.com/api/grunt.util#grunt.util.spawn However, the previous typing incorrectly recursively typed this as ISpawnOptions. child_process.spawn takes different arguments from grunt.util.spawn. I have copied in the appropriate typing from node/node.d.ts, as it is not an exported interface type. A quick inspection of the grunt source verifies that this object is passed uninspected to child_process.spawn, so all are potentially relevant. --- gruntjs/gruntjs.d.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gruntjs/gruntjs.d.ts b/gruntjs/gruntjs.d.ts index 99eadf435b..f601ce4fb6 100644 --- a/gruntjs/gruntjs.d.ts +++ b/gruntjs/gruntjs.d.ts @@ -1155,7 +1155,13 @@ declare module grunt { /** * Additional options for the Node.js child_process spawn method. */ - opts?: ISpawnOptions + opts?: { + cwd?: string + stdio?: any + custom?: any + env?: any + detached?: boolean + } /** * If this value is set and an error occurs, it will be used as the value