Executes a command with timeout.
This method uses coreutils `timeout` command on POSIX environments.
| command |
shell command. |
| timeout |
timeout duration. |
|
Result.ok(execution result), or Result.error(ShellError.INVALID_ARGUMENT) when timeout is negative. |