(command, timeout_ms = 2000, shell = null)
| 16 | // We need a wrapper because startProcess in tools/improved-process-tools.js returns a ServerResult |
| 17 | // but our tests expect to receive the actual command result |
| 18 | async function executeCommand(command, timeout_ms = 2000, shell = null) { |
| 19 | const args = { |
| 20 | command: command, |
| 21 | timeout_ms: timeout_ms |
| 22 | }; |
| 23 | |
| 24 | if (shell) { |
| 25 | args.shell = shell; |
| 26 | } |
| 27 | |
| 28 | return await startProcess(args); |
| 29 | } |
| 30 | |
| 31 | /** |
| 32 | * Check if a shell is available on the system |
no test coverage detected