(command, options, callback)
| 189 | } |
| 190 | |
| 191 | function normalizeExecArgs(command, options, callback) { |
| 192 | validateString(command, 'command'); |
| 193 | validateArgumentNullCheck(command, 'command'); |
| 194 | |
| 195 | if (typeof options === 'function') { |
| 196 | callback = options; |
| 197 | options = undefined; |
| 198 | } |
| 199 | |
| 200 | // Make a shallow copy so we don't clobber the user's options object. |
| 201 | options = { __proto__: null, ...options }; |
| 202 | options.shell = typeof options.shell === 'string' ? options.shell : true; |
| 203 | |
| 204 | return { |
| 205 | file: command, |
| 206 | options: options, |
| 207 | callback: callback, |
| 208 | }; |
| 209 | } |
| 210 | |
| 211 | /** |
| 212 | * Spawns a shell executing the given command. |
no test coverage detected
searching dependent graphs…