* The `invoke` method is responsible for building the final executable command. * * @private * @method command * @param {String} [...arguments] Arguments to be passed into the command. * @param {Object} [options={}] The options passed into child_process.spawnSync. * (https://node
()
| 34 | * (https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options) |
| 35 | */ |
| 36 | invoke() { |
| 37 | let args = Array.prototype.slice.call(arguments); |
| 38 | let options = {}; |
| 39 | |
| 40 | if (typeof args[args.length - 1] === 'object') { |
| 41 | options = args.pop(); |
| 42 | } |
| 43 | |
| 44 | return this._invoke(args, options); |
| 45 | } |
| 46 | |
| 47 | _invoke(args, options) { |
| 48 | return execaSync(this.program, args, options); |
no test coverage detected