Run ``command`` in a subprocess and return a `.Result` object. See `.Runner.run` for API details. .. note:: This function is a convenience wrapper around Invoke's `.Context` and `.Runner` APIs. Specifically, it creates an anonymous `.Context` instance and call
(command: str, **kwargs: Any)
| 34 | |
| 35 | |
| 36 | def run(command: str, **kwargs: Any) -> Result: |
| 37 | """ |
| 38 | Run ``command`` in a subprocess and return a `.Result` object. |
| 39 | |
| 40 | See `.Runner.run` for API details. |
| 41 | |
| 42 | .. note:: |
| 43 | This function is a convenience wrapper around Invoke's `.Context` and |
| 44 | `.Runner` APIs. |
| 45 | |
| 46 | Specifically, it creates an anonymous `.Context` instance and calls its |
| 47 | `~.Context.run` method, which in turn defaults to using a `.Local` |
| 48 | runner subclass for command execution. |
| 49 | |
| 50 | .. versionadded:: 1.0 |
| 51 | """ |
| 52 | return Context().run(command, **kwargs) |
| 53 | |
| 54 | |
| 55 | def sudo(command: str, **kwargs: Any) -> Result: |
no test coverage detected